When I post an image, I sometimes HTML in the text below. That used to work fine, but recently something has changed: part of the caption now shows up at the top of the page (and still also below the image, where it belongs).
An example is
this one.
Digging a bit deeper, I found out that the problem is caused by one of the meta tags in the header of the page. The general form reads:
- Code: Select all
<meta name="description" content="caption text" />
where the
caption text is replaced by the actual caption below the posted image. Normally that's fine, but this can fail if there is HTML code in the caption text. First of all, the first " that happens to appear in the caption text will close the string. Secondly, if there is a /> anywhere after that ", it will denote the end of the meta tag itself, and the rest of the caption wrecks havoc!
For the record, I can work around this myself, but similar problems may affect other pictures. More precicely, any picture that has a " in the caption! That suggests a crude but simple solution to the problem: before copying the caption text into the content attribute of the meta tag, simpy remove all double quotes, or replace them with something else.