Could a REGEX wizard please help with removing extra carriage returns?
I have a section at the beginning of my Module for Glossary Terms which I've embedded in a text artifact. However, when published using RPE, all the DIVs and SPANs create a lot of extra carriage returns. Can anyone suggest some JAvaScript/REGEX that could remove these?
Example content below:
<field:valuefield:type="richtext">
<div>
<div>
<div>
<pdir="ltr"id="_1627564729562">
<span> </span>
<spanclass="com-ibm-rdm-editor-EmbeddedResourceDecorator showContent">
<span>
<div>
<divxmlns="http://www.w3.org/1999/xhtml">
<pid="_1627555665830">[MY TEXT 1]</p>
</div>
</div>
</span>
</span>
<span> </span>
</p>
<pdir="ltr"id="_1627564729563">
<span> </span>
<spanclass="com-ibm-rdm-editor-EmbeddedResourceDecorator showContent">
<span>
<div>
<divxmlns="http://www.w3.org/1999/xhtml">
<pid="_1627555650276">[MY TEXT 2]</p>
</div>
</div>
</span>
</span>
<span> </span>
</p>
Produces:
------
<o:p> </o:p> [MY TEXT 1] <o:p> </o:p>
<o:p> </o:p> ------- |
Accepted answer
Glyn,
Do not modify it in the report. There is easier way.
Could you please check the following: -go in rm/admin >> Advanced Properties -look for the settings: publish.removePublishSpaceGenerators -What is its current value?
-If it is set to false, please set it to true, save the modification.
Bartosz Glyn Costello selected this answer as the correct answer
Comments 1
Glyn Costello
commented Sep 20 '21, 4:18 a.m.
Perfect! Spent ages trying to do something myself in REGEX... why isn't this the default? Oh well.
Thank you!
Bartosz Chrabski
commented Sep 20 '21, 4:51 a.m.
Yes, indeed good question why isn't this the default. I lost a bit time to find it too. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.