jjchico/publist — pull request #1 by karlmoritz (2013-03-22 13:06:46+00:00)
Title: Sanitization / @bibtex@ field

Hi,

I've made two minor changes to the plugin, which I believe could be useful for other people.

1) Sanitization is not applied to the @bibtex@ field. This should be default behaviour, as most likely you would use that field to offer the bibtex for cut-and-pasting. Obviously then it is better to leave things encoded properly, i.e. \'{e} instead of é etc.

2) Relatedly, I've changed the handling of curly braces in the sanitization script. It removes all non-escaped curly braces (used to indicate type sensitivity). This also removes curly braces around \'{e} etc., which for my purposes is intended behaviour (\'{e} wasn't caught by the sanitization script so far, only \'e).

In order to allow normal curly braces, escaped braces are converted to their html code. This prevents double replacement. There might be a more elegant solution, but this does the trick.

If you think this is useful, I'd appreciate if you merged my changes included in this pull request.

Cheers
Karl Moritz