escaped html tags

Hi,

I was using the renderer FckEditor in Jira 3.5, and I had to switch to JEditor when I upgraded to 6.1.

For most of the fields, the rendering is correct, but in some cases the html tags are escaped (for example <br/> becomes &lt;br/&gt;). Therefore the tags are visible in the rendered view.

Anybody knows why it happened? And why it only happened in some places?

1 answer

1 accepted

Hi Pierre,

Please check that Enter mode is set to Paragraphs in JEditor Configuration.

There's also a known bug where JEditor decides to render a field using wiki renderer. In this case wiki renderer encodes tags and tags become visible. This problem is already fixed, the fix will come with JEditor 1.5.48 (next release).

Hi Alex,

Thanks for your answer. Enter mode was already set to Paragraph, but I found a workaround: I simply copied the content of the rendered view to the Source view.

When will the new version be relased?

ETA is next week.

Hi,

I have upgraded to 1.5.48, but the problem is still there:

Hi Pierre,

These html tags look like copied from one of MS products. Do you see the tags only after copying contents or when you type text into the editor too?

We were using Jira 3.5 with Fckeditor, and when we migrated to Jira 6.1 and JEditor, that rendering problem appeared on some issues. When creating new issues there is no problem.

I know that some users used to copy from word into fckeditor, so it may be the reason why only some fields have rendering problems.

One possibility is to copy the content of the rendered view into the source view, but the problem is that there are thousands of fields with that problem. Do have an idea about how I could fix all the problematic field quicklier?

The problem is clear now.

When JEditor renders fields it decides if the contents are html formatted or wiki formatted (wiki text can contain html). It looks like for some code created by FCK JEditor makes incorrect decision.

The simplest way to fix this on your side is to update all of these fields in DB wrapping content into <div> ... </div> tag. This will force JEditor to render as html.

On our side we can change the patterns used to decide if the content is html.

I have tried to wrap the content of some fields with <div>...</div> with an SQL update, but the field still aren't rendered correctly.

Even though the whole content is wrapped in a div in the DB, in Jira, there is a paragraph after the </div> tag (in the Source view):

If you start editing an issue where tags are visible and save it with JEditor the issue will be stored like this in DB. If you already saved this issue before then wrapping with <div> tags won't help.

However other issues should be fixed, try checking them.

If this problem persists in all issues please check the html in DB, there should be no encoded tags (like &lt; and &gt;).

Ok, you are right, it works for the unedited fields :). I also had to wrap the columns oldstring and newstring in the table changeitem so that the change history is rendered correctly.

Thanks a lot for you help!

Pierre

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,995 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot