The xPage XSP editor does not allow me to type & in the src url
<xp:script src="http://maps.googleapis.com/maps/api/js?key=1234&test=1" />
or
<script src="http://maps.googleapis.com/maps/api/js?key=1234&test=1" />
I can ofcourse change the url to & but then google does not accept the url
any ideas?
?
The xPage XSP editor does not allow me to type
&in the src url
& means "Start of character reference". If you want to include one as data you must use the character reference for it: &.
I can of course change the url to
&but then google does not accept the url
The XML parser must decode it back to & when it converts from XML to a data structure. By the time it gets to Google, it shouldn't be & any more.
don't use script, use xp:scriptBlock for output scripts, like this:
<xp:scriptBlock>
<xp:this.src><![CDATA[
http://maps.googleapis.com/maps/api/js?key=1234&test=1
]]></xp:this.src>
</xp:scriptBlock>
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With