Previously, this was done on an ad-hoc basis in certain formats/fields,
but not all, which could lead to inconsistent/incorrect handling of
special characters like & and <.
Now, all metadata fields and clues default to assuming that the provided
strings are plaintext and escape XML characters so that XWord (which
renders them as HTML) renders them correctly. Functions take an
additional, optional is_html bool parameter which can be set to true if
the input should be left unchanged (since it is already valid HTML).
This is used for JPZ, IPUZ, Amuse Labs imports, and Rows Garden clues
(where we convert * to italic tags, and escape the rest of the clue
manually).
Previously, this was done on an ad-hoc basis in certain formats/fields, but not all, which could lead to inconsistent/incorrect handling of special characters like & and <.
Now, all metadata fields and clues default to assuming that the provided strings are plaintext and escape XML characters so that XWord (which renders them as HTML) renders them correctly. Functions take an additional, optional is_html bool parameter which can be set to true if the input should be left unchanged (since it is already valid HTML). This is used for JPZ, IPUZ, Amuse Labs imports, and Rows Garden clues (where we convert * to italic tags, and escape the rest of the clue manually).
Fixes #182