tsgrp / ActiveWizard

OpenContent Dynamic Forms and Workflow
http://www.tsgrp.com/products/opencontentforms/
4 stars 0 forks source link

HTML Tags display in page description on status pane #263

Closed gsteimer closed 9 years ago

gsteimer commented 9 years ago

See the screenshot below. If you have HTML tags in your page description, they show up in the status pane:

image

I understand why we do that - since the status pane cuts off the description, we don't want to display invalid HTML on the page (which would screw up the rest of the page markup).

Instead of just displaying HTML tags, we should do this:

  1. Strip off any html from the page description. I'm sure there's a way to do this with jQuery or another library we already pull into HPI...
  2. Display the first N chars in the page description and the ... if necessary.
mikeblum commented 9 years ago

I would argue since the help text div already copes with HTML markup, the page description and other areas should do the same. Super easy fix to add {{{ }}} around that div in the html template. I think right now its just {{ }} (2 vs 3 curly braces). Its like a 2 sec fix.

http://stackoverflow.com/a/20280656/1377866

gsteimer commented 9 years ago

@mikeblum - yeah, that's a better solution, assuming it accommodates the way we cut off the description. For example, in my screenshot, the text ends with <u.... If we were to use your approach, is there a chance the markup would get messed up from a cut-off description?

mikeblum commented 9 years ago

Ah yes, I forgot we truncated descriptions. I think we already expect html but don't account for the truncation scenario. One interesting case will be if an HTML-escaper like $jQuery can correctly escape invalid markup like what you have above or if it becomes a borked string.

gsteimer commented 9 years ago

I was thinking we'd strip the HTML first and then truncate to avoid that issue...

mikeblum commented 9 years ago

right you are.

We'll just want to make sure we don't strip the html markup for the full description that the user sees when they go to a page (what we see below the title there)

mikeblum commented 9 years ago

Escalating this to high priority as I just got an email from a client pointing out this issue.

renesaladrigas commented 9 years ago

ACTIVE FORM -- Tags are no longer displayed in the page description on the status pane and the message is truncated to 78 chars.

CR - MBlum Fixed with revision #13203

renesaladrigas commented 9 years ago

Corrected previous commit to pass unit tests that were failing. Revision #13205