"mailto" will open Outlook in Big5 and this will cause dirty codes.
Solution:
- Encode params using $.param()
-
Convert UTF-8 to Big5
(Download this plugin: https://code.google.com/p/utf8tobig5/) - Replace "+" with "%20"
Example:
1 2 3 4 5 6 7 8 9 |
var email_params = { subject: 'Fiiser 推薦 you "' + item.title + '"', body: 'Fiiser recommend you "' + item.title + '": ' + item.appurl } var url = 'mailto:support@fiiser.com?' + $.param(email_params); url = EncodedUTF8ToBig5(url); url = url.replace(/\+/g, '%20'); $panel.find('.share_list .email').attr('href', url); |
Reference: