whitespaces are removed from html

Hi, it seems like Episerver CMS 5 doesnt render html in a completely valid way. If you take a look at the html-source at http://labs.episerver.com or http://www.situationsthlm.se/ or even the demo templates that come with the epi-installation, you can for example see that the meta tags are rendered on one long line, and what is more severe, all whitespaces are removed before the tag is closed. Ie, is rendered as , notice the whitespace at the end. This happense even if you write a simple
in the ascx, it get's rendered as
. Anybody who knows a workaround for this?
Dec 06, 2007 10:50
Try rendering the data with Escape Characters / Carriage Returns. http://www.peachpit.com/articles/article.aspx?p=31938&seqNum=9
Dec 06, 2007 11:13
Yes, we sorted out the all-in-one-row-problem with that, but the actual metatag is built with HtmlMeta tag = new HtmlMeta(); tag.Name = name; aso... which should render just fine (and does outside of epi). and it isn't only the metatag that is affected, but all tags.
Dec 06, 2007 11:19
Hi! I have reproduced this on a EPiServer CMS 5 r1 site and it seems to be related to the friendly url rewrite provider. I can not reproduce it on the SP1 branch though so hopefully a fix will be out for this in the coming weeks.
Dec 06, 2007 15:29
Hi! I was i contaact with support earlier today and suggested that maybe it was the urlrewriter that was the bad guy, good to hear that it probably is solved, looking forward to sp1 then :)
Dec 06, 2007 15:56
Hi Måns! First, it definitely is the friendly url rewrite provider that removes the whitespace and that has not changed in the sp1. Do you have problems with the rendering of pages in the browser or is it "just" ugly looking source code? Empty tags(meta, hr, img and so on) without whitespace before the closing /> are actually valid according to the XML specification since the whitespace is optional. You can check it out at http://www.w3.org/TR/xml/ where it is declaration 44.
Dec 11, 2007 16:29
Hi, sorry, I should have been more clear, they are valid, but for better backward compatibility with HTML, you should use a space character before the '/' character. And the page renders fine, but the sourcecode isn't very pretty to look at. And btw, do you know if the urlrewriter takes for example å and sends back å to the browser?
Dec 11, 2007 16:58
Good to hear that you don't have any immediate problems. Regarding entities: Named entities are not touched but hex/decimal ones are expanded.
Dec 12, 2007 10:44
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.