Any idea on how to resolve this error Element type...
# suitescript
v
Any idea on how to resolve this error Element type "br..." must be followed by either attribute specifications, ">" or "/>".
m
Need more of the code. But sounds like you have HTML and a
<br>
element that isn't closed.
v
Hello Marvin, checking the pdf template this is only part of the xml that has the
<br>
on it
Copy code
<td rowspan="3" border="1px" padding-top="25px"><u>Product Description:</u><br />${item.description[0..*200]}<#if item.description?length gt 200>...</#if><br />
                        <#if item.custcol_ns_kwrs_sing_comp_qty_use?has_content>
                        Length(s) Per Cut: ${item.custcol_ns_kwrs_sing_comp_qty_use} FT
                        </#if>
                    </td>
m
Try without the space.
v
still the same error
b
usual debugging step is to delete the brs one by one to figure out which one it is
i personally suspect neither and its something like a truncated br in the item description
v
Hello battk, yes, i removed all the brs and the error is still reproducible i also suspect its something to do with item description because I changed the item description to "test" and it proceeded with no errors.
b
stop truncating the item description
if that fixes the problem, you had the good/bad luck of truncating at a bad place
if you really wanted to truncate the item description, you would need to actually escape the html inside of it
v
i removed
<#if item.description?length gt 200>...</#if>
and i still get the error i changed ${item.description[0..*200] to ${item.description[0..*100] and it proceeds the item description looks like this 1-1/2" X 12" GALV JAW X J 1-1/2" X 12" HG-228 JAW & JAW GALVANIZED TURNBUCKLE 1-1/2" X 12" HG-228 JAW & JAW GALVANIZED TURNBUCKLE WLL: 21,400 LBS #1032938 CROSBY DESIGN FACTOR 5 TO 1 WT 32.6 LBS COC CERTIFICATION SCHEDULE B CODE 7318.19.0000 COO USA ECCN EAR99 any suggestions for dealing with long item description?
b
escape the item description
👍 1