Make WordPress Core

Opened 18 years ago

Closed 17 years ago

Last modified 17 years ago

#2062 closed defect (bug) (fixed)

Post formatting destroy HTML comments

Reported by: arenoic's profile 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)

#1 @arenoic
18 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)

#2 @arenoic
18 years ago

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

#3 @arenoic
18 years ago

  • Version changed from 1.5.2 to 2.0

#4 @jhodgdon
17 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.

#5 @foolswisdom
17 years ago

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