Closed (outdated)
Project:
Mailing Label
Version:
6.x-1.1-beta1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Oct 2009 at 16:29 UTC
Updated:
28 Mar 2026 at 11:47 UTC
Jump to comment: Most recent
Comments
Comment #1
acouch commentedThis uses the ufpdf converter to make the pdfs using the UTF-8 character set. From your question I'm not really sure what your issue is. Can you rephrase?
Comment #2
mcrickman commentedIf your label contains an '&' sign the printed output is '& a m p ;' minus spaces.
I wrote this as a work around.
mailing_label.module.php line 85
Charlie
Comment #3
acouch commentedThis makes sense. I will try and take a look.
Comment #4
letapjar commentedone potential problem here:
this line would replace ALL matches of "amp". but if my contact lives on "Lamplight Lane" this would be
changed to "Llight Lane" by the above code.
why is this line even necessary?
Once the line above replaces "&" correctly there should be no more "amp" representing the ampersand correct?
Have you tried using html_entitiy_decode() ?
This is probably the best way to properly get your ampersands and quotes back and should safely un-do what the check_plain() is doing in the plugin display attachment.
Comment #5
richardtmorgan commentedI tried this with html_entity_decode() (you need to add the ENT_QUOTES constant to get it to process quotes too :-))
The strangest behaviour - which I won't try to explain - is that you need to run $v through html_entity_decode() twice - once when you add it to $val and once prior to that. Modifying existing line 85 (
$val .= "$v\n";) to these two lines:sorted it fine.
Presumably this is why Charlie in #2 ended up needing to run his string replace on & twice. Why? I've no idea - but the fix I've implemented does produce the right output.
Comment #6
bluegeek9 commented