Remove HTML tags from text

  • Updated

The purpose of this Action example is to remove HTML tags from a description and save the clean description in another feature.

This example is provided as inspiration only. It must be adapted to your Perfion environment to work. Perfion Support does not assist with such adaptations. Please contact your Perfion Partner or your Perfion consultant if you need assistance.

Action Map

  • All lines containing a Command are created as virtuals. This is a recommended best practice
  • The "." in the first From field means "current Perfion database"
  • The script used for remove HTML tags can only be used from Perfion version 4.8.0 and up

Sample data for building Action Map

Data must be adapted to your Perfion environment to work

Action Map - FromToCommandActionScriptNote
.tblProductsSELECT.PERFION <Query>
      <Select languages='EN'>
      <Feature id='Description'/>
   </Select>
   <From id='100' />
   <Where>
      <Clause id='Description' operator='HAS' />
   </Where>
</Query>
 
ID     
Description_EN     
tblProductstblProductsSELECT   
ID     
Description_ENCleanDescription_EN  if( !HasValue ) return;
Value = Regex.Replace(Value.ToString(), "<.*?>", " ").ToString();
 
tblProductsProductIMPORT   

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.