Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Server-Side Components/Server Side/Remove HTML Tags/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Removing the HTML tags from the HTML fields in the list view.
For example, the 'Fix Notes' field in the problem table is an HTML field and displays with all the HTML tags in the list view.
The screenshot below shows a difference in the list view.

<img width="1255" height="172" alt="image" src="https://github.com/user-attachments/assets/bff0f4ce-2d63-4ed9-9e70-3f3e27cc3f18" />
12 changes: 12 additions & 0 deletions Server-Side Components/Server Side/Remove HTML Tags/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//Create a new string field called 'Fix Notes(u_fix_notes)' in the problem table.
//Select the 'calculated' checkbox in the field dictionary, and add the code to the script section.
//This would be helpful if you want to export HTML fields in a report.
(function calculatedFieldValue(current) {
var htmlText = current.fix_notes; // Getting the value of the current fix notes (HTML field)
var decodedText = htmlText.replace(/&#(\d+);/g, function(match, dec) {
return String.fromCharCode(dec);
}).replace(/<[^>]*>/g, '').replace(/&amp;/g, '&').replace(/&lt;/g, '<')
.replace(/&gt;/g, '>').trim();
return decodedText;
})(current);

Loading