Covert HTML to Plain

Hi Team,

I’m new to Gatling I’m doing a POC, and a situation i need to convert the HTML response value to Plain text. Any EL or custom function on Gatling to handle the situation like on JMeter or LoadRunner.

LR provide web_convert_param(“ParameterName”,“SourceEncoding=HTML”,“TargetEncoding=PLAIN”, LAST );
and JMeter provide ${__unescapeHtml(${ParameterName})}

JMeter’s __unescapeHtml just boils down to

You could ship this library and write your own custom function, eg:

exec { session =>
val escaped = session(“param”).as[String]
val unescaped = StringEscapeUtils.unescapteHtml4(escaped)
session.set(“param”, escaped)

That’s also something we could consider implementing in a future version if there’s enough demand for it.