Skip to:
Content

bbPress.org

Opened 14 years ago

Closed 14 years ago

#1770 closed defect (bug) (fixed)

Editing reply containing HTML gets escaped.

Reported by: jaredatch's profile jaredatch Owned by:
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0
Component: Front-end Keywords: needs-patch
Cc:

Description

To reproduce:

Post a reply with HTML, eg <a href="http://bbpress.org">bbpress.org</a> (this can be done using the Visual Editor or HTML mode, does not matter).

Edit reply, this will be the contents in TinyMCE:

&lt;a href="http://bbpress.org" rel="nofollow"&gt;bbPress.org&lt;/a&gt;.

Attachments (2)

oops.jpg (133.1 KB) - added by jaredatch 14 years ago.
1770.patch (462 bytes) - added by johnjamesjacoby 14 years ago.
Decode

Download all attachments as: .zip

Change History (9)

#1 @alexvorn2
14 years ago

It is normal to see such thing in visual editor, but in HTML editor is must be a problem...
The community now is working on the 2.1 version, so please try the latest 2.1 version and see if the problem still occurs.

#2 @johnjamesjacoby
14 years ago

  • Milestone 2.1 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

This *should* be exactly the way that wp_editor works everywhere else.

If you paste

<a href="http://bbpress.org">bbpress.org</a>

into the visual editor, and switch to HTML, it encodes them automatically. Switch back to the visual editor, and it looks normal. Save and view. It should look normally formatted.

Now paste that exact thing into the HTML editor, and switch to visual. Nothing is encoded, as raw HTML is assumed.

When you paste HTML into the visual editor, it doesn't try to turn it into real HTML. Instead it assumes you wanted your brackets and quotes made pretty. When you paste HTML into the HTML editor, it assumes you wanted it to be HTML and interprets it as such.

It's possible we have some filters out of order somewhere, so it's worth looking at again to make sure. Best I can tell, it's working exactly as expected.

Last edited 14 years ago by johnjamesjacoby (previous) (diff)

@jaredatch
14 years ago

#3 @jaredatch
14 years ago

I was able to duplicate this on two separate installs.

One running 2.1 nightly on 3.3.x and another with 2.1 nightly and 3.4 nightly. The second one had no plugins activated other than bbP and just using stock 2011.

#4 @jaredatch
14 years ago

  • Milestone set to 2.1
  • Resolution worksforme deleted
  • Status changed from closed to reopened

#5 @alexvorn2
14 years ago

found the bug!
in the return of the function "function bbp_get_form_topic_content()"

Function Reference esc_textarea() must be removed.

jaredatch feel free to add a patch here :D

#6 @johnjamesjacoby
14 years ago

1770.patch decodes the html entities specifically for wp_editor, leaving it escaped properly elsewhere.

@johnjamesjacoby
14 years ago

Decode

#7 @johnjamesjacoby
14 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [3797]) Decode $post_content for wp_editor in bbp_get_the_content(). Fixes #1770. Props alexvorn2, props jaredatch.

Note: See TracTickets for help on using tickets.