WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

Last modified 7 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:

Description

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

Change History (5)

comment:1 arenoic8 years ago

A possible patch is replace de sentence

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

for

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

in the wptexturize function (line num 14)

comment:2 arenoic8 years ago

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

comment:3 arenoic8 years ago

  • Version changed from 1.5.2 to 2.0

comment:4 jhodgdon7 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 foolswisdom7 years ago

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