Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#6011 closed bug (fixed)

Numeric character references, eg,   are inserted as plain text when text does not contain tags

Reported by: doug Owned by: john
Priority: major Milestone: 1.4.2
Component: manipulation Version: 1.4.1
Keywords: Cc:
Blocked by: Blocking:

Description

Inserting, for example, .html(" ") actually inserts " " due to calling context.createTextNode( elem ) in the 'clean' method. The inappropriate call is due to rhtml.test( elem ) returning false.

SOLUTION:

Check for num. char. ref., which have '#' in the rhtml reg exp.

rhtml = /<|&#?\w+;/,

Change History (3)

comment:1 Changed 10 years ago by john

Owner: set to john
Priority: criticalmajor
Status: newassigned

Good catch, checking in to this.

comment:2 Changed 10 years ago by dmethvin

Should it also accept char entities like &quot; &lt; &gt; &amp; or are the numeric ones all we need to handle?

comment:3 Changed 10 years ago by john

Component: coremanipulation
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.