From afd55854e33d60d6177982bfa9b33d7cafafdd57 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Fri, 22 Aug 2008 14:48:26 -0400 Subject: Fixed wikilink ext to use an AtomicString for label. There's still a problem with the inline stuff though. As far as I can tell it is not related to the ext directly but in markdown itself. --- markdown_extensions/wikilink.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'markdown_extensions') diff --git a/markdown_extensions/wikilink.py b/markdown_extensions/wikilink.py index 47037a6..fd0b62f 100644 --- a/markdown_extensions/wikilink.py +++ b/markdown_extensions/wikilink.py @@ -69,7 +69,6 @@ Dependencies: ''' import markdown -from markdown import etree class WikiLinkExtension (markdown.Extension) : def __init__(self, configs): @@ -106,8 +105,8 @@ class WikiLinks (markdown.BasePattern) : base_url, end_url, html_class = self._getMeta() url = '%s%s%s'% (base_url, m.group('camelcase'), end_url) label = m.group('camelcase').replace('_', ' ') - a = etree.Element('a') - a.text = label + a = markdown.etree.Element('a') + a.text = markdown.AtomicString(label) a.set('href', url) if html_class: a.set('class', html_class) -- cgit v1.2.3