#1682 closed defect (fixed)
HTML links in data fail to display correctly
Reported by: | Martin Morrison | Owned by: | jng |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | AJAX Viewer | Version: | 2.2.0 |
Severity: | critical | Keywords: | |
Cc: | External ID: |
Description
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.
Change History (5)
comment:1 by , 14 years ago
Component: | General → AJAX Viewer |
---|---|
Owner: | set to |
comment:2 by , 14 years ago
comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Under "other issues" caused by Martin's fix...it seems like all/most special characters breaks the hyperlink (I have "?" and "=" in my URLs and the hyperlink does not code properly).