Plugin Directory


Opened 4 years ago

Closed 4 years ago

#2122 closed defect (duplicate)

HTML comments should be visible

Reported by: avryl Owned by:
Priority: normal Severity: normal
Plugin: wp-front-end-editor Keywords:


Just like the <!--more--> and <!--nextpage--> comments, any HTML comments should be visible inside the post content.

Attachments (2)

2122.patch (1.3 KB) - added by rhurling 4 years ago.
2122-v2.patch (1.2 KB) - added by rhurling 4 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 @avryl4 years ago

  • Component changed from not-listed to wp-front-end-editor

comment:2 @rhurling4 years ago

maybe some str_replace could do the trick?

$content = str_replace(array(
), array(
), $content);

don't know if we'll need to use the entity versions in the search/replace arrays

comment:3 @avryl4 years ago

Yes, but you should convert all the comments back. :)

comment:4 @rhurling4 years ago

yeah i know that much :D
I'll try to make a patch tomorrow (i'm in germany, so its the middle of the night right now)

@rhurling4 years ago

@rhurling4 years ago

comment:5 @rhurling4 years ago

added a patch (and a fixed patch) for this which replaces on output via str_replace and on submission via js .replace
just needs to be tested (since im not sure it'll work)

comment:6 @avryl4 years ago

I think it would be better to replace both in PHP. Currently you'll find two places where the more and next page comments are converted. You'll also need to replace comments as a whole, not <!-- and --> separately. If I type --> in the editor, I don't want that converted. :)

comment:7 @kraftbj4 years ago

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.