Project

General

Profile

Defect #1604

Issue with $htmlize.get

Added by John Makkink about 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
velocity
Target version:
Start date:
09/30/2025
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

I am testing the new Velocity plugin 4.0. All looks good my compliments but I encounter 1 issue regarding the $htmlize.get

What I noticed is that doesn't restore < and > anymore what means invalid html.

For example the result of $htmlize.get is now this:

&lt;div class='status_red' title='red'&gt;&nbsp;&lt;/div&gt;

In version 3.8.1 (what we currently using):

<div class='status_red' title='red'>&nbsp;</div>;

In our HTML we use the following:

<div class='status_red' title='red'>&nbsp;</div>;
<pre>

In our HTML we use the following:
<pre>
<td class="icon">$!htmlize.get($!status_func.call(6, $record.care_treatment_id))</td>
</pre>

This function $!status_func will return a <div> <span> or <html>

I saw in the code that in version 3.8.2 a change was in this function. 

Can you help us,

Kind regard, 
John Makkink
eFertility

History

#1

Updated by John Makkink about 2 months ago

I am testing the new Velocity plugin 4.0. All looks good my compliments but I encounter 1 issue regarding the $htmlize.get

What I noticed is that doesn't restore < and > anymore what means invalid html.

For example the result of $htmlize.get is now this:

&lt;div class='status_red' title='red'&gt;&nbsp;&lt;/div&gt;

In version 3.8.1 (what we currently using):

<div class='status_red' title='red'>&nbsp;</div>;

In our HTML we use the following:

<td class="icon">$!htmlize.get($!status_func.call(6, $record.care_treatment_id))</td>

This function $!status_func will return a <div> <span> or <html> like in the examples above

I saw in the code that in version 3.8.2 a change was in this function.

Can you help us,

Kind regard,
John Makkink
eFertility

#2

Updated by Patrick Talbot about 2 months ago

  • Status changed from New to Resolved

Thanks for reporting, John!
I found the issue and fixed it in v4.0.1 released today.
Check it out from the Files section and let me know how it goes.

BTW, if you have put the "VM_global_library.vm" file in your report folder (at the top level), you can use the macro #h() instead of $!htmlize.get(), so this could be:

<td class="icon">#h($!status_func.call(6, $record.care_treatment_id))</td>

Also available in: Atom PDF