-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No product data in the document (PDF) #2451
Comments
Allowing HTML in a PDF can be dangerous. I guess you could do all sorts of funny stuff within a PDF. I think it should be the other way around: HTML should always be encoded in the PDF and only raw if you really want it (which - to be honest, you shouldn't do on FE user input - unless the attribute value is sanitized and only allows safe tags and attributes). Not sure if this can be resolved. The administrator is the only one that knows the contents of the attributes. So I guess this will be sort of "solved" automatically once you switch to Twig. You will have to add |
it has nothing to do with HTML… even if the field contains valid HTML, TCPDF would still incorrectly interpret a |
we are facing the same issue with a textarea field.
So we added htmlentities to the options array output. |
If you have an attribute of the type "Text field" which is defined by your customer, the following problem can show up.
The customer inserts a special character (e.g. von <0.05% = n.d.) in the text field.
The special characters are output and understood by TCPPDF as HTML characters.
Therefore the product data is not outputed in the document.
Go to the iso_collection_invoice.html5 template:
Replace the following code
<?= $this->attributeValue($name, $value, ['html'=>true, 'item'=>$item['item']]) ?>
through
<?= htmlentities($this->attributeValue($name, $value, ['html'=>true, 'item'=>$item['item']])) ?>
The text was updated successfully, but these errors were encountered: