witten
/
luminotes
Archived
1
0
Fork 0

When Html_nuker was initialized with allow_refs, the code was incorrectly

allowing character/entity references, so ":" was becoming just "58".
This commit is contained in:
Dan Helfman 2007-07-19 18:24:08 +00:00
parent 0e968d0b60
commit 6bb233f8da
1 changed files with 2 additions and 2 deletions

View File

@ -17,11 +17,11 @@ class Html_nuker( HTMLParser ):
def handle_charref( self, ref ):
if self.allow_refs:
self.result.append( ref )
self.result.append( "&#%s;" % ref )
def handle_entityref( self, ref ):
if self.allow_refs:
self.result.append( ref )
self.result.append( "&%s;" % ref )
def handle_comment( self, comment ):
pass