[mapguide-trac] #1682: HTML links in data fail to display correctly
MapGuide Open Source
trac_mapguide at osgeo.org
Mon May 9 10:46:42 EDT 2011
#1682: HTML links in data fail to display correctly
------------------------------+---------------------------------------------
Reporter: martinmorrison | Owner:
Type: defect | Status: new
Priority: high | Milestone:
Component: General | Version: 2.2.0
Severity: critical | Keywords:
External_id: |
------------------------------+---------------------------------------------
With the AJAX viewer html anchor tags (hyperlinks) do not display
correctly in the properties pane. In 2.02 hyperlinks worked. You could
place html anchor tags in the data and they displayed as clickable
hyperlinks in the properties window. With 2.2 I see the anchor tags in
the properties window, not the links. There was a reference to this issue
in this thread...
http://osgeo-org.1803224.n2.nabble.com/Hyperlinks-in-Properties-pane-of-
Ajax-viewer-td5480165.html When I look at what is coming to the browser
in Firebug I see escaped data, e.g. < rather than <.
I have managed to get the links working, however now it does not comply
with standard html practices. The half hack was to add the following line
to propertyctrl.templ.
*******************LINE TO ADD****************************
code = code.replace(/</gi,'<').replace(/>/gi,'>');
**********************************************************
The function to add it to is: SetProperties() It goes just before the
line " SetContent(code);". This is a hack. It is NOT a correct fix. It
should be passed correctly from the server. This does cause other issues.
E.g. this does not decode quotes, spaces etc from URL's. In order for
this to work I had to remove from my data quotes from the URL.
Old -> <a href="/propcards/036680.pdf" target="_blank">Click Here(PDF)</a>
New -> <a href=/propcards/036680.pdf target="_blank">Click Here(PDF)</a>
Both are valid HTML. MapGuide should be able to handle the quotes in the
href= statement. We should not be doing a javascript hack and changing
data to get this to work correctly.
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1682>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list