Ticket #1146 (closed defect: fixed)
Quotes in tiddler titles are not escaped correctly
| Reported by: | jayfresh | Owned by: | FND |
|---|---|---|---|
| Priority: | undefined | Milestone: | |
| Component: | tiddlyweb | Version: | |
| Severity: | undefined | Keywords: | escaping |
| Cc: |
Description
Hello,
When you create a new tiddler, save it to TiddlyWeb and refresh, if that tiddler has double-quotes in the title, these are not escaped correctly in the HTML.
E.g. a title of 'a tiddler with "quotes" in the title' should be serialized as:
<div title="a tiddler with "quotes" in the title">
In fact it is serialized as:
<div title="a tiddler with \"quotes\" in the title>
It looks like this is happening in tiddlyweb/serializations/html.py from line 157:
def _tiddler_div(self, tiddler): The string that starts the div that contains a tiddler. return u'<div class="tiddler" title="%s" server.page.revision="%s" ' \ 'modifier="%s" modified="%s" created="%s" tags="%s" %s>' % \ (escape_attribute_value(tiddler.title), tiddler.revision,
