HTML in feature long description - wrong coding in image URL in case of running in IE11
Hi,
Could anyone give advice on how to set the URL for the image in the feature long description so that the characters were not damaged? The problem occurs in Internet Explorer 11 and charset "windows-1250".
In the feature long description there is: <img src="http://maps.googleapis.com/maps/api/streetview?size=250x150&location={adr_adresa.adr}&fov=90&pitch=-10&sensor=false" />
But the final URL captured in Fiddler looks like this: http://maps.googleapis.com/maps/api/streetview?size=250x150&location=?koln?%20398,%20Rat?kovice,%20Rat?kovice&fov=90&pitch=-10&sensor=false
And the user can see no image:
_img_ alt="Result of the wrong coding in the feature long description" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=906f2000000fxfA&feoid=Body&refid=0EMf2000000kAGu" _/_img_
I have tried to set charset in meta tag in Index.html but without any result.
Jana
0
-
This looks like a back-end issue... can we see what the location attribute for that reocrd is? I bet that you'll need to url-encode those locations in the data ie "%C5%A1koln%C3%AD%20rat%C3%AD%C5%A1kovice" instead of "školní ratíškovice" 0 -
Hi Zack,
You are totaly right, but how to encode this URL in the img tag of the feature long description?
The location attribute adr_adresa.adr is this:
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000fyJK&feoid=Body&refid=0EMf2000000kAKD"_/_img_0 -
If I'm not mistaken (and I may very well be) you won't be able to do it within Geocortex. It would require runing a script within the maptips which would require customization of the viewer, for security and probably also stability purposes we as site admins have been prevented from doing such things in the out-of-the-box Geocortex HTML5 viewers.
SO you'll probably find that the easiest way to tackle this problem is in the data itself, if that's an option for you. You'll want to create a new field to use for the urls and populate it with encoded locations, then use that field for these urls instead. How you do this will be determined by your backend, for example MS Sql Server has a builtin function "urlencode" in TSQL to handle url encoding but Postgres would probably need to use a custom function or a really complicated regex. You might find it easier to do with python or javascript instead.0 -
Hi Zack,
Thanks for your advice. We created a custom function in Postgres and it works.
Jana0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare