Adoxio / xRM-Portals-Community-Edition

The definitive edition of Microsoft Open Source Portals, supported by the experts in portals.
MIT License
107 stars 60 forks source link

Activity subgrid - description field is rendering as HTML text #67

Closed mawankhade closed 6 years ago

mawankhade commented 6 years ago

After upgrade to V 8, In portal description column of Activity subgrid is rendering raw HTML.

image

By compairing with older version , there seems to be difference with the way html and text content has been handled in entity-grid.js.

Latest (V.8) var html = $this.formatAttributeValue(attribute, attribute.AttributeMetadata, j, record, data); if (html.isHtml) { $td.html(html.value); } else { $td.text(attribute.DisplayValue); } Older Version(7.)** var html = $this.formatAttributeValue(attribute, attribute.AttributeMetadata, j, record) || attribute.DisplayValue; var $td = $("") .attr("data-type", attribute.Type) .attr("data-attribute", attribute.Name) .attr("data-value", typeof attribute.Value === 'object' ? JSON.stringify(attribute.Value) : attribute.Value) .html(html);

please let me know if its bug ?

amervitz commented 6 years ago

It seems like a fairly deliberate change. Unless there's a different behavior in an online portals environment, I don't think this would be considered a bug. Can you test this in an online portal and report back the results?

amervitz commented 6 years ago

@mawankhade do you have an update on this?

mawankhade commented 6 years ago

sorry for delayed response.

No I did not get chance to try it on online portal.

My guess on current implementation is they are assuming that user will not show email body column in subgrid and that's why they are not handling email body type column as HTML.

for now we have modified code to handle every content as HTML and this seems to be working for us.

Thanks, Mahesh

amervitz commented 6 years ago

If you find this works differently in online portals and want to contribute your local code change feel free to add more information to this issue. I will close this issue for now.