• Welcome to Simple Machines Community Forum. Please login or sign up.
September 23, 2021, 04:33:09 PM

News:

SMF 2.0.18 has been released! Please update. Read more.


Bug on QuickModify: The message body was left empty.

Started by Kolya, March 28, 2020, 06:45:06 PM

Previous topic - Next topic

Kolya

In SMF 2.0.17 there is a bug with posting special characters (eg: ä,ö,ü) and unicode emojis (😊) when in quick modify mode.
You can test this here on the board, or just see the attached screenshot.

The issue is similar to one I posted about a while ago and so I was able to fix this:

In Themes\default\scripts\topic.js

FIND

x[x.length] = 'subject=' + escape(document.forms.quickModForm['subject'].value.replace(/&#/g, "&#").php_to8bit()).replace(/\+/g, "%2B");
x[x.length] = 'message=' + escape(document.forms.quickModForm['message'].value.replace(/&#/g, "&#").php_to8bit()).replace(/\+/g, "%2B");


REPLACE

x[x.length] = 'subject=' + document.forms.quickModForm['subject'].value;
x[x.length] = 'message=' + document.forms.quickModForm['message'].value;


FIND

x[x.length] = 'subject=' + document.forms.quickModForm['subject'].value.replace(/&#/g, "&#").php_to8bit().php_urlencode();


REPLACE

x[x.length] = 'subject=' + document.forms.quickModForm['subject'].value;


Note that in SMF 2.1 a similar fix has already been implemented. The various escaping and replace functions have been removed there as well.

Kindred

Thank you, tes. This is a known issue ( it was reported the day after 2.0.17 release.)

A fix will be in 2.0.18
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Kolya

I noticed that the fix I posted above truncates URLs at '&' characters when quick modifying posts. I therefore recommend NOT to use this fix.

Instead follow the instructions by SMF developer shawnb61 here: https://www.simplemachines.org/community/index.php?topic=571082.msg4042818#msg4042818

(Unfortunately I cannot edit my first post anymore, to point at shawnb61's post directly.)

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: