]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/HTML-escaped_titles_in_Atom__44___RSS_feeds_don__39__t_validate.mdwn
web commit by http://weakish.int.eu.org/: HTML::Template can keep things simple
[ikiwiki.git] / doc / bugs / HTML-escaped_titles_in_Atom__44___RSS_feeds_don__39__t_validate.mdwn
1 The Atom and RSS templates use `ESCAPE=HTML` in the title elements. However, HTML-escaped characters aren't valid according to <http://feedvalidator.org/>.
2
3 Removing `ESCAPE=HTML` works fine, but I haven't checked to see if there are any characters it won't work for.
4
5 For Atom, at least, I believe adding `type="xhtml"` to the title element will work. I don't think there's an equivalent for RSS.
6
7 > Removing the ESCAPE=HTML will not work, feed validator hates that just as
8 > much. It wants rss feeds to use a specific style of escaping that happens
9 > to work in some large percentage of all rss consumers. (Most of which are
10 > broken).
11 > <http://www.rssboard.org/rss-profile#data-types-characterdata>
12 > There's also no actual spec about how this should work.
13
14 > This will be a total beast to fix. The current design is very clean in
15 > that all (well, nearly all) xml/html escaping is pushed back to the
16 > templates. This allows plugins to substitute fields in the templates
17 > without worrying about getting escaping right in the plugins -- and a
18 > plugin doesn't even know what kind of template is being filled out when
19 > it changes a field's value, so it can't do different types of escaping
20 > for different templates.
21 >
22 > The only reasonable approach seems to be extending HTML::Template with an
23 > ESCAPE=RSS and using that. Unfortunately its design does not allow doing
24 > so without hacking its code in several places. I've contacted its author
25 > to see if he'd accept such a patch.
26 >
27 > (A secondary bug is that using meta title currently results in unnecessry
28 > escaping of the title value before it reaches the template. This makes
29 > the escaping issues show up much more than they need to, since lots more
30 > characters are currently being double-escaped in the rss.)
31
32 > --[[Joey]]
33
34 > Update: Ok, I've fixed this for titles, as a special case, but the
35 > underlying problem remains for other fields in rss feeds (such as
36 > author), so I'm leaving this bug report open. --[[Joey]]