Opened 14 years ago

Closed 14 years ago

#312 closed defect (wontfix)

decode xml string before rendering attribute in www\fusion\widgets\SelectionPanel.js

Reported by: poulet1212 Owned by: madair
Priority: P2 Milestone: 2.2
Component: Widgets Version: 1.1.1
Severity: Major Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New

Description

SelectionPanel?.js (Version is 2.1 beta): in the renderFeature function, at line 403, the instruction:

td.innerHTML = layerObj.getElementValue(featureIdx, i);

outputs the requested attribute values for a selection.

If a value contains html tags such as links, it won't be rendered as html but as simple text because the html tags are not decoded from the xml string. for example a "&lt;" should be decoded as "<" before it is passed to innerHTML.

Change History (5)

comment:1 by madair, 14 years ago

Milestone: Future2.1

comment:2 by madair, 14 years ago

Milestone: 2.12.2

comment:3 by madair, 14 years ago

Status: newassigned

I don't know MG Meastro/Studio well enough to know how to return markup in the property values. Can you provide a package that does so I can test this?

comment:4 by poulet1212, 14 years ago

I think it's not clear enough what I've described. This is not about MG Maestro/Studio. So far I know, Maestro/Studio is not able to return markup in the property value (like you can do with an expression for MapTip). I was meaning a "dirty" way to have a markup in property value if the object property is already a markup. For example, I have a parcel feature source with an attribute named "fotography" that contains an <a> tag linked to the foto. I know that feature source data may not contain markups inside and therefore it's why I've called it dirty way. If you do this, you see in the property panel the whole markup code source but not its graphical representation. I'm not sure that you want this feature in MG.

Probably the way to achieve this correctly would be, like you said, to return markup from a property value by using an expression (like in MapTip). But this would be a new feature and not a bugfix.

So I suggest to close this ticket like it is...

comment:5 by madair, 14 years ago

Resolution: wontfix
Status: assignedclosed

closing the issue as suggested. If you can provide a data set which exhibits the behaviour (i.e. with markup in the property values), feel free to re-open the ticket and attach the data.

(As a side note, markup in the attribute labels are correctly decoded and displayed)

Note: See TracTickets for help on using tickets.