Bug! Replace with icon

Status
Not open for further replies.

juuser

Well-Known Member
Hello,

I have noticed a problem when in element settings I choose "Replace with icons" and choose static icon, for example named "info" i get the following error in list header:

Warning: DOMDocument::loadXML(): Unescaped '<' not allowed in attributes values in Entity, line: 1 in E:\Apache24\htdocs\components\com_fabrik\models\element.php on line 684

Warning: DOMDocument::loadXML(): attributes construct error in Entity, line: 1 in E:\Apache24\htdocs\components\com_fabrik\models\element.php on line 684

Warning: DOMDocument::loadXML(): Couldn't find end of Start Tag span line 1 in Entity, line: 1 in E:\Apache24\htdocs\components\com_fabrik\models\element.php on line 684

Warning: DOMDocument::loadXML(): Extra content at the end of the document in Entity, line: 1 in E:\Apache24\htdocs\components\com_fabrik\models\element.php on line 684

These four rows are generated for every record in the list.

I have updated from Github a couple of days ago.

BR,
Martin
 
Hi Hugh,

Figured out the cause. These error lines only appear when I had "Replace with icon" selected and textarea element truncate on list was active. Disabled truncate and problem solved, at least for me. :cool:

BR,
Martin
 
"Retain HTML" was set to "no" when errors appeared. Now tried with "yes" and in this case no error messages appear. So it seems to be a combination of:

Replace with icons: ON
Truncate: List
Retain HTML: No

BR,
Martin
 
I'm still not entirely sure why that happens. The error you were getting means that an unescaped or unencoded '<' is getting into the data we're processing for the icon name. Even with "Retain HTML" set to No, we do ...

Code:
$text = htmlspecialchars(strip_tags($text), ENT_QUOTES);

... which should a) remove all html tags, and b) encode any < or > left in the text (that weren't part of a tag) into HTML entities like &lt; amd &gt;. So I just don't see how anything is slipping through that.

Oh well. As long as it's working now, I'm not going to worry too much about it.

-- hugh
 
BTW, what was your setting for "Show hover text", and was your data long enough to get truncated?

Bearing in mind the tooltip on the length setting (on words vs characters depending on HTML mode).

-- hugh
 
Hi,

"Show hover text" was "on", but data was not long enough to get truncated.

BR,
Martin
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top