Make WordPress Core

Opened 19 years ago

Closed 17 years ago

Last modified 14 months ago

#2912 closed defect (bug) (worksforme)

HTML editor has a problem with special characters conversion

Reported by: tenpura's profile tenpura Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.1
Component: TinyMCE Keywords:
Focuses: Cc:

Description

For instance, if you upload a file with a title xxx'">< and send it to the editor with Linked to Page option, you will get inconsistent published results like below.

Firefox with visual rich editor
1st time, seems ok.

<a href="http://yoursite.com/wordpress/archives/1/xxx/" id="p7" rel="attachment" class="imagelink" title="xxx&#39;&quot;&gt;&lt;">
<img src="http://yoursite.com/wordpress/wp-content/uploads/somefile.thumbnail.jpg" id="image7" alt="xxx&#39;&quot;&gt;&lt;" />
</a>

2nd time (Simply go edit and save to republish the same thing), &quot;&gt;&lt; are removed.

<a href="http://yoursite.com/wordpress/archives/1/xxx/" id="p7" rel="attachment" class="imagelink" title="xxx&#39;">
<img src="http://yoursite.com/wordpress/wp-content/uploads/somefile.thumbnail.jpg" id="image7" alt="xxx&#39;" />
</a>

Firefox without visual rich editor
bare single quote

<a id="p7" rel="attachment" class="imagelink" href="http://yoursite.com/wordpress/archives/1/xxx/" title="xxx'&quot;&gt;&lt;">
<img id="image7" src="http://yoursite.com/wordpress/wp-content/uploads/somefile.thumbnail.jpg" alt="xxx'&quot;&gt;&lt;" />
</a>

Opera without visual rich editor
broken

<a ID="p7" REL="attachment" CLASS="imagelink" HREF="http://yoursite.com/wordpress/archives/xxx/" ONCLICK="doPopup(7);return false;" TITLE="xxx'

I temporarily forbid html special characters for the file title to avoid this mess.

Change History (4)

#1 @matt
18 years ago

  • Milestone changed from 2.1 to 2.2

#2 @foolswisdom
18 years ago

  • Milestone changed from 2.2 to 2.4

#3 @thee17
17 years ago

  • Component changed from Administration to TinyMCE

#4 @thee17
17 years ago

  • Milestone 2.5 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I cant seem to be able to replicate in trunk

Note: See TracTickets for help on using tickets.