22853 Posts in 9936 Topics by 2804 members
Page: 1 2
|Go to End||Next >|
28 April 2010 at 4:12pm
I use firefox, then is error,
XML Parsing Error: not well-formed
Line Number 71, Column 70:
<td style="font-weight:bold;"><a href="tin-nhp/?newsID=9&offset=1">Test News</a></td>
But when using IE will not error happen.
28 April 2010 at 4:32pm
28 April 2010 at 4:59pm
Just a guess, could it be that the & in the href should be &?
28 April 2010 at 6:54pm
Thanks , done.
28 April 2010 at 7:19pm Last edited: 28 April 2010 7:20pm
Remove the XML header <?xml version="1.0" encoding="UTF-8"?> from your template.
It can break a lot of stuff, namely:
- You will get an XML error every time you enter an & or sometimes " in the CMS (for example as Page-Title)... unless you escape values properly in the template. It should be $Title.XML for regular usage and $Title.ATT for attributes.
So most of the time it's a better idea to get rid of the XML header.
28 April 2010 at 8:33pm
Won't it break html validation if you leave out the XML header?
I don't think it's a good idea to remove it. To me it's like having a warning system, and rather than addressing the issues that are causing the warnings, you are turning off the warning system.
28 April 2010 at 9:46pm Last edited: 28 April 2010 9:54pm
I used to think the same way as you do, but the XML header causes so many problems, it's just not worth it to go and fix stuff for this (I'm talking about code written by third parties like jQuery plugins, that work perfectly fine without the XML header).
Update: You don't need the "warning" system you speak of, validation covers that already (eg. an unescaped ampersand also fails validation).
Update 2: FYI: Here's an example of a native jQuery function that doesn't work with an XML document: http://api.jquery.com/html
Plugins relying on this function will fail.. not sure if there are other functions like this, but it's possible...
29 April 2010 at 11:42am
Interesting stuff. Cheers for all the info.
Page: 1 2
|Go to Top||Next >|