Commit 7489b1af authored by Martijn Pieters's avatar Martijn Pieters

As extra is no longer mandatory, grab the correct lexicon ID for the error...

As extra is no longer mandatory, grab the correct lexicon ID for the error message and in the process escape it so no HTML can be sneaked in.
parent faab8af5
......@@ -14,6 +14,8 @@
"""Plug in text index for ZCatalog with relevance ranking."""
from cgi import escape
import ZODB
from Persistence import Persistent
import Acquisition
......@@ -71,7 +73,7 @@ class ZCTextIndex(Persistent, Acquisition.Implicit, SimpleItem):
lexicon = getattr(caller, lexicon_id, None)
if lexicon is None:
raise LookupError, 'Lexicon "%s" not found' % extra.lexicon_id
raise LookupError, 'Lexicon "%s" not found' % escape(lexicon_id)
if not ILexicon.isImplementedBy(lexicon):
raise ValueError, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment