We have a client that uses a wordpress blog, when he pastes in our video embed code it changes &’s into &
so for a workaround he has to re-write &
as &
Does this break code? Would doing something like <code></code>
in wordpress fix the issue?
Example:
<param name="adServerURL" value="http://plg.website.com/dynamic_preroll_playlist.vast2xml?domain=111aaabbb&pubchannel=KidS&" />
Technically yes they are all the same thing. Since it’s wordpress I would recommend using the
&
as that’s the encoded version of the ampersand& or &
.WordPress references:
http://wordpress.org/support/topic/how-to-get-rid-of-amp-and-038
http://wordpress.org/support/topic/unwanted-characters-038
Iâm not sure of what you mean, as your text refers to changing & into &. Probably you meant changing the ampersand letter & to
&
, but here you need to use the â{ }â button to âescapeâ it to make it visible.Itâs a correct change. In HTML, the ampersand has a special meaning, and this applies to occurrences in URLs, too. Mostly you can get away with it if you donât âescapeâ it, but escaping is the right thing to doâfailing to do so may sometimes break the code.
Using
<code>
markup has no impact on this.I did something like this using java script:
In WordPress specifically, if you’re getting an unwanted
&
instead of an ampersand, this is most likely coming fromesc_url
:Use
esc_url_raw
instead, which under the hood will simply callesc_url
and skip that conditional by passing a different context as argument.