Strip HTML tags

Contains tips for configurators working with Aware IM
Post Reply
RLJB
Posts: 914
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

Strip HTML tags

Post by RLJB »

When you use the HTML editor on a plain text attribute it inserts html tags, these can cause problems in other places around your app - for example, custom queries will show the tags and presentations/reports will show the tags. You can use a rule on the BO and a function and regular expression to strip HTML tags, try this (you may need to clean / refine some more):

Code: Select all

OfficialAnnouncement.NoteClean=REPLACE_PATTERN(OfficialAnnouncement.Note, '<(.|\n)+?>', ' ')
Rod. Aware 8.6 (latest build), Developer Edition, on OS Linux (Ubuntu) using GUI hosted on AWS EC2, MYSQL on AWS RDS
Post Reply