问题
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&" />
回答1:
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
回答2:
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.
来源:https://stackoverflow.com/questions/8511295/does-amp-or-038-or-mean-the-same-thing-in-code