Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

whitespaces are removed from html

Vote:
 
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?
#15912
Dec 06, 2007 10:50
Vote:
 
Try rendering the data with Escape Characters / Carriage Returns. http://www.peachpit.com/articles/article.aspx?p=31938&seqNum=9
#16622
Dec 06, 2007 11:13
Vote:
 
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.
#16623
Dec 06, 2007 11:19
Vote:
 
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.
#16624
Dec 06, 2007 15:29
Vote:
 
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 :)
#16625
Dec 06, 2007 15:56
Vote:
 
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.
#16626
Dec 11, 2007 16:29
Vote:
 
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?
#16627
Dec 11, 2007 16:58
Vote:
 
Good to hear that you don't have any immediate problems. Regarding entities: Named entities are not touched but hex/decimal ones are expanded.
#16628
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.