Closed (fixed)
Project:
Invite
Version:
5.x-1.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
11 May 2007 at 22:26 UTC
Updated:
5 Aug 2007 at 21:16 UTC
Jump to comment: Most recent file
Invite module escapes quotation marks and other characters it considers special in the message text, which looks odd in plain text e-mail.
For instance, something like it&39s instead of it's.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | invite-tokens.patch | 2.64 KB | smk-ka |
Comments
Comment #1
mlncn commentedSorry about the other two duplicate posts– I was getting a complete OSUOSL error screen, and never thought it was actually posting when I asked the page to reload.
Comment #2
smk-ka commentedDoesn't happen for me. To test it, I've edited the default email template and included an apostrophe as well as an ampersand. Saved and sent an invite: looks ok, ie. plain text with no HTML entities. Could you elaborate on this issue?
--
Stefan Kudwien
unleashed mind
Comment #3
noah10 commentedTo duplicate this problem, try writing the following custom message when you invite someone:
-------------
Dude, it's the best! "Check it out" & you'll see how great it i$!
-------------
The recipient will see HTML entities in place of apostrophes, ampersands, etc. in the message above. I believe the reason for this is the use of @message rather than !message in the template - the '@' tells Drupal to call check_plain when substituting the variable (see http://api.drupal.org/api/5/function/t ), and check_plain replaces some characters with their HTML entities. I'll try to test this and provide a patch if my theory is correct.
Comment #4
mlncn commentedYes, Noah's right, the problem is in user-submitted custom messages, rather than the template. I should have specified.
I hope it is a one-character fix!
benjamin, Agaric Design Collective
Comment #5
smk-ka commentedThis should be true for any other tokens, too. The attached patch includes an update path to change all tokens to the new format, and the required changes to the module itself. Please test.
Comment #6
smk-ka commentedI have taken some time to finally implement Token support for Invite. This patch should also fix the bad escaping. This means I'd like to use the patch from #5 as a simple backport for the 4.7x branch, and would like to invite (what else? ;) everyone else to take a look at the linked issue.
--
Stefan Kudwien
unleashed mind
Comment #7
smk-ka commentedToken support has been committed, also fixing this issue.
--
Stefan Kudwien
unleashed mind
Comment #8
(not verified) commented