Make WordPress Core

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#2062 closed defect (bug) (fixed)

Post formatting destroy HTML comments

Reported by: arenoic Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: Administration Keywords: formatting, comment, wptexturize
Focuses: Cc:


When you put an HTML comment into a post-textarea the function wptexturize converts the string "-->" in "–>"

Change History (5)

comment:1 @arenoic10 years ago

A possible patch is replace de sentence

 $curl = str_replace('--', '–', $curl);


if (!strstr($curl, '-->') ) {
 $curl = str_replace('--', '–', $curl);

in the wptexturize function (line num 14)

comment:2 @arenoic10 years ago

Maybe is better use strpos() instead of strstr()

comment:3 @arenoic10 years ago

  • Version changed from 1.5.2 to 2.0

comment:4 @jhodgdon9 years ago

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

I am unable to reproduce this behavior in SVN [4984]. When I paste an HTML comment into the "Code" section of the Edit Post window (as opposed to the Visual section), it makes it through to the blog without any trouble.

Of course, the current behavior in the Visual editor is that when you type a "<", it is converted into a &lt; entity, so it is pretty much impossible to type an HTML comment into the Visual editor section.

This is with all filtering-type plugins turned off, by the way.

So I will close this for now as fixed; feel free to reopen with more information if you think it is still broken.

comment:5 @foolswisdom9 years ago

  • Milestone 2.2 deleted
Note: See TracTickets for help on using tickets.