---
title: "How to convert HTML code to text"
url: "https://academy.jahia.com/sites/academy/contents/knowledge-base/2021/how-to-convert-html-code-to-text.html"
last_updated: 2026-10-01
---

# How to convert HTML code to text

cleanup html tags Developer Jahia 7.3 Jahia 8

## Question

I want to extract long description in a list

## Answer

An easy way is to use the removeHtmlTags function. It works like this:

```
<%@ taglib prefix="functions" uri="http://www.jahia.org/tags/functions" %>
...
<c:set var="myText" value="${currentNode.properties.myText.string}"/>
${functions:removeHtmlTags(myText)}
```

You can also use this static function `org.jahia.taglibs.functions.Functions.removeHtmlTags` from a groovy script!
