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

Ticket #10683 (new enhancement)

Opened 4 months ago

Last modified 1 month ago

[PATCH] add String#arrHTMLEscapes property to easily extend String#escapeHtml and String#unescapeHtml

Reported by: joao.a.cardoso Assigned to: sam
Priority: normal Milestone: 2.x
Component: Prototype Version: edge
Severity: minor Keywords: escapeHtml, unescapeHtml
Cc:

Description

The current implementations of the aforementioned methods supports on three HTML escapes, and it is not easy to extend to more escapes.

The attached file implements a more complete set of escapes in a way that is easy to extend. Please include it in future releases if you this if you will.

I am currently using it wit success.

Attachments

MyPrototypeExtensions.2.js (1.7 kB) - added by joao.a.cardoso on 01/03/08 15:44:48.
alteranate implementation of escapeHTML and unescapeHTML
MyPrototypeExtensions.js (1.7 kB) - added by joao.a.cardoso on 01/03/08 15:44:58.
alteranate implementation of escapeHTML and unescapeHTML

Change History

01/03/08 15:44:48 changed by joao.a.cardoso

  • attachment MyPrototypeExtensions.2.js added.

alteranate implementation of escapeHTML and unescapeHTML

01/03/08 15:44:58 changed by joao.a.cardoso

  • attachment MyPrototypeExtensions.js added.

alteranate implementation of escapeHTML and unescapeHTML

01/14/08 20:00:44 changed by kangax

  • summary changed from Incomplete implementation of Object#escapeHtml and Object#unescapeHtml to [PATCH] Incomplete implementation of Object#escapeHtml and Object#unescapeHtml.

04/13/08 04:04:37 changed by jdalton

  • type changed from defect to enhancement.
  • severity changed from normal to minor.
  • summary changed from [PATCH] Incomplete implementation of Object#escapeHtml and Object#unescapeHtml to [PATCH] add String#arrHTMLEscapes property to easily extend String#escapeHtml and String#unescapeHtml.

This patch: #8452 extends IE/Safari support to allow a wider variety of characters to be escaped/unescaped, as well as fix some other issues.