Search code examples
asp.net-mvcencodingwhitespacecarriage-return

ASP MVC possible encoding issue showing carriage returns in HTML output


This is a weird one,

I have an ASP MVC 3 project (developed for Chrome only support), and in the last couple of weeks I noticed this weird character appearing in the HTML output.

Example here

I think this has something to do with the encoding of the document (even if it's UTF-8) and the other thing I noticed are white spaces showing up in strings in the HTML output (screenshot below from the Chrome web inspector):

Example here

If I remove these from the inspector then everything works fine but I cannot explain why this stuff is there in the first place. Looks like the View in visual studio is outputting the white spaces (and carriage returns) as they are in the source code.

Any help would be really appreciated!

Thank you


Solution

  • I posted a question about this exact problem a few days ago. Funny thing i just tried some things out and came here to update my post and saw your.

    This has to be a bugg with their latest release off Chrome (it worked before it) and how they handle -webkit-font, in my specfic case it was

    -webkit-font-smoothing: antialiased;
    

    so give it a try to comment out everything with -webkit-font in your css..

    hope this helps