Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Remove html tags from table transformer results

Alan Harding
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 24, 2024

I am displaying fields from Jira Epics on a Confluence page using the Insert Jira Issue/Filter macro inside a table transformer macro.  Everything is working perfectly except one of the fields I am showing is of the type Wiki Style Renderer.  Even if the text has received no formatting in Jira I still get <p> and </p> tags around the text.  And of course if the text does have formatting I see all those html tags as well.

Is there any way to transform this field to just plain text and remove the html?  I tried the following but it is not having any effect.  

SELECT
T1.'Acceptance Criteria (old)'::string->replaceAll("/(<([^>]+)>)/ig"," ")
FROM T*
ORDER BY DATE(T1.'Target end') ASC

The regex seems to be the issue, if I replace it with <p> then it works as expected.

1 answer

2 votes
Stiltsoft support
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.
January 25, 2024

Hi @Alan Harding ,

It seems that the issue is caused by a Confluence bug that was reported on 17/Jan/2024 https://jira.atlassian.com/browse/CONFSERVER-94113.

You may check this link and add your vote there.

Meanwhile, we can suggest the following workaround via the Table Transformer macro:

SELECT T1.'Data',
HTML_DECODE(T1.'Data'::string) AS 'New Data'
FROM T*

Thu 15-1.png

Please note that the version on the Table Filter, Charts & Spreadsheets app should be 10.3.1 or a newer one for the function to work properly.

Please check it with your Confluence administrator and update if required.

Stiltsoft support
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.
January 25, 2024

Hi @Janice  ,

As we see, our custom tags were added to the system - thank you so much! We always add them to the related questions.

Please one more issue from our side: last week we officially renamed our app from "Table Filter and Charts for Confluence" to "Table Filter, Charts & Spreadsheets for Confluence".

Please can you update one of our tags as well: table-filter-and-charts -> table-filter-charts-spreadsheets?

Other tags are good as they are.

Thank you!

Like Janice likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events