[wp-trac] [WordPress Trac] #39175: Customizer assumes url is passed with replaceState and pushState
WordPress Trac
noreply at wordpress.org
Thu Dec 8 16:19:33 UTC 2016
#39175: Customizer assumes url is passed with replaceState and pushState
---------------------------+-----------------------------------------
Reporter: Christian1012 | Owner: westonruter
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.7.1
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript, administration
---------------------------+-----------------------------------------
Comment (by Christian1012):
@westonruter Yup, looks about right to me. I will add that from a brief
look around the web, most tutorials reference the history methods in
question as taking 3 parameters and do not always make it apparent the
third is optional. In my experience, it's always wise to harden your
application as much as possible against incorrect implementations
downstream. I can imagine a scenario where someone might attempt:
`window.location.replaceState( data, '', false );`
This code will not throw an exception and warn them in the console, and
work as expected in a theme. However, as consequence, the Customizer
would quietly have the same issues as discussed in this ticket. Is it
perhaps wise to provide that extra check here as well? See
[https://core.trac.wordpress.org/attachment/ticket/39175/39175.3.diff].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39175#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list