Make WordPress Core

Opened 20 years ago

Closed 19 years ago

Last modified 9 years ago

#2414 closed defect (bug) (worksforme)

Ampersand Bug in RTE Interface

Reported by: rajkp's profile rajkp Owned by:
Milestone: Priority: low
Severity: normal Version: 2.0.1
Component: TinyMCE Keywords: ampersand, wysiwyg, tinymce, bug, fix, rte
Focuses: Cc:

Description

There is a bug in the WordPress plugin for TinyMCE (the one that provides the more and next page tags). If you attempt to use an ampersand, greater than, or less than, each attempt to edit the source OR to save the file results in an endless string of &'s which grows with each such attempt.
The plugin filters out the ampersand character, but TinyMCE already does this, so the WordPress filtering just messes things up.

There is an easy fix:
Delete every line in the wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js file that refers to the ampersand character:

content = content.replace(new RegExp('&', 'g'), '&');

content = content.replace(new RegExp(' ', 'g'), ' ');

I was unable to commit this change using Subversion, so I hope someone else can do this for me.

Attachments (1)

editor_plugin.js (10.8 KB) - added by rajkp 20 years ago.
Bug Fix for Ampersand Bug

Download all attachments as: .zip

Change History (4)

@rajkp
20 years ago

Bug Fix for Ampersand Bug

#1 @foolswisdom
19 years ago

  • Keywords rte added
  • Milestone 2.0.1 deleted
  • Summary changed from Ampersand Bug in WYSIWYG Interface to Ampersand Bug in RTE Interface

Hi rajkp,

Thank you for reporting this issue. I am having trouble understanding how to reproduce the bug.

Using SVN head (r4198), I tried the following:

  1. Click the "Split Post with More tag" button
  1. Edit source, add '&' before "More" in the source.
  1. Click Update
  1. Edit source again.

There was no change.

Thank you,
Lloyd

PS. Please attach patches, not source files.

$ svn diff filename.php > filename.diff

#2 @Nazgul
19 years ago

  • Component changed from General to TinyMCE
  • Resolution set to worksforme
  • Status changed from new to closed

Closing as there has been no reponse from the reporter in over 6 months.

Please feel free to reopen if there is additional information.

This ticket was mentioned in Slack in #docs by idealien. View the logs.


9 years ago

Note: See TracTickets for help on using tickets.