Opened 5 years ago
Closed 5 years ago
#13177 closed task (fixed)
Release Trac 1.3.6
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.3.6 |
Component: | general | Version: | |
Severity: | normal | Keywords: | release |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
This ticket is used to coordinate the finalization and testing of the next development-stable release of Trac, 1.3.6.
Attachments (0)
Change History (7)
comment:1 by , 5 years ago
Description: | modified (diff) |
---|---|
Milestone: | 1.3.5 → 1.3.6 |
Summary: | Release Trac 1.3.5 → Release Trac 1.3.6 |
comment:3 by , 5 years ago
Replying to Ryan J Ollos:
On the trunk, the
replace
function isn't effectively stripping out thespan
tags: trunk/contrib/wiki2rst.py@16978:68#L63. See trunk/INSTALL.rst.
This will be addressed in #12835.
comment:4 by , 5 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
I'll create the release in a few days once the remaining 4 issues are resolved.
comment:5 by , 5 years ago
html
is amarkupsafe.Markup
object. I'm not sure that this is the best way to fix it, but it seems to work:
It seems we should convert from a Markup
instance to a unicode
instance, otherwise a Markup
instance should be passed to replace()
.
>>> from markupsafe import Markup >>> v = Markup('<span>xxxx</span>') >>> v Markup(u'<span>xxxx</span>') >>> unicode(v).replace(u'<span>xxxx</span>', '') u'' >>> v.replace(Markup(u'<span>xxxx</span>'), '') Markup(u'')
I think it it easy to convert to a unicode
instance.
-
contrib/wiki2rst.py
diff --git a/contrib/wiki2rst.py b/contrib/wiki2rst.py index 722bef338..e8317113e 100755
a b def wiki2rest(env, context, wiki): 64 64 text = re.sub('\r?\n', '\n', wiki.text) 65 65 text = re.sub(r'\[\[TracGuideToc\]\]\r?\n?', '', text) 66 66 text = re.sub(r'\[\[PageOutline\([^\)]*\)\]\]\r?\n?', '', text) 67 html = format_to_html(env, context, text)68 html = html. unescape().replace(u'<span class="icon">\u200b</span>', '')67 html = unicode(format_to_html(env, context, text)) 68 html = html.replace(u'<span class="icon">\u200b</span>', '') 69 69 html = re.sub(r'<em>\s*([^<]*?)\s*</em>', r'<em>\1</em>', html) 70 70 html = '<html><body>%s</body></html>' % html 71 71 writer = io.BytesIO()
comment:6 by , 5 years ago
Thanks, that fixes removal of bracketed text that I didn't notice when using unescape
.
Committed to trunk in r17075.
comment:7 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
On the trunk, the
replace
function isn't effectively stripping out thespan
tags: trunk/contrib/wiki2rst.py@16978:68#L63. See trunk/INSTALL.rst.html
is amarkupsafe.Markup
object. I'm not sure that this is the best way to fix it, but it seems to work:contrib/wiki2rst.py
Thoughts?