Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11437 (new defect)

Opened 2 months ago

[PATCH] String#stripTags doesn't need the "i" flag in the regexp

Reported by: jdalton Assigned to: savetheclocktower
Priority: normal Milestone: 2.x
Component: Prototype Version: edge
Severity: minor Keywords:
Cc:

Description

Why is the "i" flag needed, there is no case characters to worry about.
Lower and upper characters are included in the negative character class.

 [^>]+

should be:

return this.replace(/<\/?[^>]+>/g, '');

:P

Attachments

strip_tags_fix.diff (333 bytes) - added by jdalton on 03/27/08 03:04:30.
the fix :P

Change History

03/27/08 03:04:30 changed by jdalton

  • attachment strip_tags_fix.diff added.

the fix :P