[wp-trac] [WordPress Trac] #33102: Shortcodes with Quoted Attributes Break Inside of Quoted HTML Attributes
WordPress Trac
noreply at wordpress.org
Fri Jul 24 05:49:22 UTC 2015
#33102: Shortcodes with Quoted Attributes Break Inside of Quoted HTML Attributes
--------------------------+------------------------------
Reporter: cgrymala | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version: 4.2.3
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+------------------------------
Comment (by scamartist26):
Replying to [comment:21 cooperator_JR]:
> Hi scamartist26 ,
> I said before and gave an example:
> When a same post is edited by different people in different days a week,
the last person to edit use the script '''Last updated Post on'''
> == ==
> ""DAY/MONTH/YEAR"" .
> Replying to [comment:18 scamartist26]:
> > There is no context of your shortcode here. Can you elaborate where
this script implemented?
Shortcodes are typically written like this: `[shortcode argument=value]`
or `[shortcode argument='value']` or the way in question in this thread
`[shortcode argument="value"]` of course there is the absolute
`[shortcode]`.
I do not see this in your code example. I see a script tag, and
JavaScript. I do not see where `[shortcode]` is input. This thread is
specific to the code I mentioned above. If you have an example of that it
would helpful. If you are inserting JavaScript tags the way you have
mentioned inside of `the_content` then your problem is likely that
`do_shortcode` is filtering the `+montharray[month]+` because of it's
brackets. Also, quotes need to be properly escaped, which is likely the
reason for this security update. JavaScript was never intended to be
directly inserted into `the_content`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33102#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list