It took me about 2 hours to work this one out, but it I ended up getting there at the end.
I had ‘'’ in comments on this blog, and they were written as ‘'’ in the source, yet they didn’t want to come up as apostraphes.
So I’m scratching my head, and I’m thinking –
- ‘'’ is a valid XML element.
- XHTML is valid XML
- Hence – ‘'’ should display correctly.
That would all be well and good (according to my deductive reasoning) except for the fact that – ' IS NOT VALID HTML.
So – on that note, if you are displaying something on an HTML page – don’t use
XMLFormat(), as it will escape your apostraphes into a very annoying ‘'’. Use
That also being said, if you are pulling in text from XML feeds, you may wish to filter out the ‘'’ and replace them with real apostraphes, as quite obviously they won’t display correctly.
Just thought I would share this one.
You can see some more at: XHTML 1.0 – HTML Compatibility Guidelines
I just discovered, that ' actually works as intended in Mozilla based browsers, however not in IE. I’m not totally surprised mind you. Just something else to factor into the mix.