Roboteka
Roboteka · Robots · Strip HTML tags from text

Strip HTML tags from text

The Strip HTML Tags from Text robot removes all HTML tags from a string and returns clean text in Bitrix24 (Alaio) business processes and robots. It can optionally decode HTML entities (for example, & into &). Extra spaces and tabs are collapsed and the edges are trimmed. It returns a Cleaned text string for saving to a field or further processing.

The robot removes all HTML tags from a given string (based on strip_tags), leaving only the text content. The input is a source string and a Decode HTML entities flag: when enabled, entities such as &, ", < are converted into plain characters. After cleaning, repeated spaces and tabs are collapsed into a single space and leading and trailing spaces are trimmed. The output is a Cleaned text string. When to use it: clean the body of an incoming email or an HTML product description before writing it to a CRM text field; prepare text for an SMS or notification where markup is not allowed; strip formatting from data coming from a web form or an external service. Use the result in subsequent business process actions.

What input parameters does the robot accept?

Parameter Type Required? Default
Source string string yes
Decode HTML entities (& → &) bool

What does the robot return?

Parameter Type
Cleaned text string

Scenario: cleaning an email body before saving it to a deal

  1. The HTML text of an incoming email arrives in the process
  2. The robot removes the HTML tags and decodes the entities
  3. The Cleaned text is saved to a deal text field without any markup

Related robots

Related articles