escaped html tags

Pierre Cattin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 19, 2013

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

0 votes
Answer accepted
Kirill Bobrovskikh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 19, 2013

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).

Pierre Cattin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 20, 2013

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?

Kirill Bobrovskikh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 20, 2013

ETA is next week.

Pierre Cattin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 12, 2013

Hi,

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

Kirill Bobrovskikh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 16, 2013

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?

Pierre Cattin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2013

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?

Kirill Bobrovskikh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2013

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.

Pierre Cattin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2013

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):

Kirill Bobrovskikh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2013

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;).

Pierre Cattin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2013

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 Sign up to answer