Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#4302 closed defect (bug) (fixed)

HTML in text widgets reloaded incorectly in sidebar admin

Reported by: liamj's profile LiamJ Owned by: rob1n's profile rob1n
Milestone: 2.2.1 Priority: normal
Severity: normal Version: 2.2
Component: Administration Keywords: text widget xhtml compliance has-patch commit
Focuses: Cc:


When I visit the sidebar widget admin page and my text widget contents is reloaded from the database all the &s I had in the link text within it are retrieved as normal &s (and I assume the same applies for other tags like this?).

For example, if I'd originally entered part of my text as this;

<a href=";prop2=somethingelse">

The sidebar admin page would be reloading it from the database like this;

<a href="">

Thus, unless I re-correct the text widget each time I go in there I end up saving a non-XHTML compliant contents to the text widget. Oh, and this is happening on load, not save. If I save after correcting the contents my generated pages are XHTML compliant.

Attachments (1)

format_to_edit.diff (741 bytes) - added by ryan 17 years ago.
Pass widget text through format to edit

Download all attachments as: .zip

Change History (6)

17 years ago

Pass widget text through format to edit

#1 @ryan
17 years ago

The text wasn't being formatted for editing. Try that patch.

#2 @ryan
17 years ago

  • Milestone set to 2.2.1

#3 @rob1n
17 years ago

  • Keywords has-patch added

#4 @rob1n
17 years ago

  • Keywords commit added
  • Owner changed from anonymous to rob1n

I reproduced it, and then applied the patch, which worked.

#5 @rob1n
17 years ago

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

(In [5499]) Pass text widget text through format_to_edit. Props Ryan. fixes #4302

Note: See TracTickets for help on using tickets.