Bug Tracker

Modify

Ticket #756 (closed enhancement: fixed)

Opened 6 years ago

Last modified 6 years ago

.text(val) should set escaped text

Reported by: john Owned by:
Priority: major Milestone:
Component: core Version:
Keywords: Cc:
Blocking: Blocked by:

Description

Current it just sets the HTML, when it should set the actual text instead.

For example:

  $("p").text("<b>foo</b>");

Would give this result:

  <p>&lt;b&gt;foo&lt;/b&gt;</p>

Change History

comment:1 Changed 6 years ago by john

  • Version 1.1 deleted
  • Type changed from bug to enhancement
  • Milestone 1.1 deleted

comment:2 Changed 6 years ago by joern

  • Status changed from new to closed
  • Resolution set to fixed

Added to SVN, with an additional stripTags argument.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.