Remy Blank wrote: > How is trac.dist.extract_javascript_script? I can't find a reference to > that anywhere in the code, and that's where the encoding option is missing.
Ok, got it. The following patch fixes the issue: Index: trac/dist.py =================================================================== --- trac/dist.py (revision 10762) +++ trac/dist.py (working copy) @@ -219,7 +219,8 @@ out = StringIO() stream = Stream(XMLParser(fileobj)) - stream.select('//script[@type="text/javascript"]').render(out=out) + stream = stream.select('//script[@type="text/javascript"]') + stream.render(out=out, encoding='utf-8') out.seek(0) return extract_javascript(out, keywords, comment_tags, options) I'm wondering if there are other calls to `render()` where the encoding needs to be stated explicitly. -- Remy
signature.asc
Description: OpenPGP digital signature