How to prevent http.ListenAndServe altering style attributes in static output? : <p>In a very rudimentary handwritten web page (no js, stylesheets, etc) I have some static html with a section that looks like this.</p>

<pre><code>&lt;li style="font-size:200%; margin-bottom:3vh;"&gt;
  &lt;a href="http://192.168.1.122:8000"&gt;
    Reload HMI
  &lt;/a&gt;
&lt;/li&gt;
</code></pre>

<p>I'm using Go's http.ListenAndServe to serve the page. What's coming out looks like this:</p>

<pre><code>&lt;li style="font-size:200%!;(MISSING) margin-bottom:3vh;"&gt;
  &lt;a href="http://192.168.1.122:8000"&gt;
    Reload HMI
  &lt;/a&gt;
&lt;/li&gt;
</code></pre>

<p>Note the altered style attribute.</p>

<p>The server implementation is also rudimentary. It's launched as a goroutine:</p>

<pre><code>// systemControlService provides pages on localhost:8003 that
// allow reboots, shutdowns and restoring configurations.
func systemControlService() {
    info("Launching system control service")
    http.HandleFunc("/", controlPage)
    log.Fatal(http.ListenAndServe(":8003", nil))
}

// loadPage serves the page named by title
func loadPage(title string) ([]byte, error) {
    filename := "__html__/" + title + ".html"
    info(filename + " requested")
    content, err := ioutil.ReadFile(filename)
    if err != nil {
        info(fmt.Sprintf("error reading file: %v", err))
        return nil, err
    }
    info(string(content))
    return content, nil
}

// controlPage serves controlpage.html
func controlPage(w http.ResponseWriter, r *http.Request) {
    p, _ := loadPage("controlpage")
    fmt.Fprintf(w, string(p))
}                                    
</code></pre>

<p>In func <code>loadPage()</code> above, <code>info</code> is a logging call. For debug, I'm calling it just before returning the content of <code>controlpage.html</code>. The log entry shows it's not mangled at that point, so the problem pretty much has to be within ListenAndServe. </p>

<p>I'm not finding anything in the Go docs for <code>http</code> that seems applicable. I have no idea what's going on here. Any help appreciated.</p>
