[Zope] html_quote problem
Florent Guillaume
fg@nuxeo.com
Mon, 7 Oct 2002 15:21:37 +0000 (UTC)
Kevin Carlson <khcarlso@bellsouth.net> wrote:
> I am retrieving some text from an RDB to display on a page. My problem, a
> browser error, occurs when there is an apostrophe ['] character in the text
> returned from the database. My first instinct was to use the html_quote
> attribute for the var tag, but that does not work for an apostrophe
> character. Here is an example:
>
> text returned from database = "Test' test test"
>
> <dtml-var dbText html_quote>
>
> This still produces the ' character in the html. Am I missing something?
> Does html_quote handle this character?
It's perfectly legal to have an apostrophe in html. Your problem must
lie somewhere else, you're probably using your variable in a context
where an apostrophe is forbidden, like a javascript or a badly-quoted
url. We need more info. What's the context where the browser complains?
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com