[wp-trac] [WordPress Trac] #21448: unfiltered HTML comments from a frame js fix breaks js in windowed comments
WordPress Trac
wp-trac at lists.automattic.com
Thu Aug 2 17:09:56 UTC 2012
#21448: unfiltered HTML comments from a frame js fix breaks js in windowed comments
--------------------------+------------------------------
Reporter: nerrad | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 3.4.1
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Comment (by SergeyBiryukov):
The problem is that ColorBox uses `append()` to add the response to DOM:
[[BR]]
https://github.com/jackmoore/colorbox/blob/master/colorbox/jquery.colorbox.js#L592
According to [http://api.jquery.com/append/#comment-67912032 Karl
Swedberg's comment]:
All of jQuery's insertion methods use a domManip function internally to
clean/process elements before and after they are inserted into the DOM.
One of the things the domManip function does is pull out any script
elements about to be inserted and run them through an "evalScript routine"
rather than inject them with the rest of the DOM fragment. It inserts the
scripts separately, evaluates them, and then removes them from the DOM.
So with the attached plugin active, the script in
`wp_comment_form_unfiltered_html_nonce()` is executed earlier than the
corresponding input element is inserted into DOM.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21448#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list