SimplePortal

Support => English Support => Topic started by: aegersz on June 19, 2018, 07:33:09 PM

Title: minor Shoutbox bug that converts quotes into """
Post by: aegersz on June 19, 2018, 07:33:09 PM
as it says, some characters undergo this odd translation to &xyx eg.:

"hi" -> "hi"
Title: Re: minor Shoutbox bug that converts quotes into """
Post by: ♦ Ninja ZX-10RR ♦ on June 20, 2018, 05:32:59 PM
Are you using utf8? I cannot reproduce it on our shoutbox.
Title: Re: minor Shoutbox bug that converts quotes into """
Post by: aegersz on June 20, 2018, 05:45:37 PM
i moved to UTF-8 years ago and this is a relatively new problem.

it's not a worry but i was wondering why, that's all.

don't worry about it, it's just puzzling ... thanks for trying to recreate it anyway.

btw, it happens for the "<" and ">" symbols also.
Title: Re: minor Shoutbox bug that converts quotes into "&quot;"
Post by: Chen Zhen on June 22, 2018, 11:49:11 PM

Do you have any plug-ins for the Simple Portal shoutbox installed?
If so, can you temporarily uninstall it & test again to see if it is a shoutbox plug-in causing the problem?
Title: Re: minor Shoutbox bug that converts quotes into "&quot;"
Post by: Chen Zhen on June 23, 2018, 01:01:02 AM
Uninstall the extra shoutbox options plug-in version 1.71 & delete it.
Afterward you can install version 1.72:
https://web-develop.ca/index.php?action=downloads;area=stable_simple_portal_plugins;file=25

Title: Re: minor Shoutbox bug that converts quotes into "&quot;"
Post by: aegersz on June 25, 2018, 04:22:38 PM
Hi, thanks - i am working on it as i am running 2.3.6 and have a couple of conflicts to deal with ... standby
Title: Re: minor Shoutbox bug that converts quotes into "&quot;"
Post by: aegersz on June 26, 2018, 03:14:32 PM
BACKUP first ...

Code: [Select]
cd /var/www/html
cp Themes/default/PortalShoutbox.template.php Themes/default/PortalShoutbox.template.php-Extra_Shoutbox_Options_v1.71_to_v1.72_upgrade

THEN ... in ./Themes/default/PortalShoutbox.template.php:

conflicts addressed; the lines that i needed to change plus comments to v.71 prior to the install are shown below:

change:
Code: [Select]
function template_shoutbox_xml()
{
        global $context, $txt;

to:
Code: [Select]
function template_shoutbox_xml()
{
        global $context, $txt, $smcFunc;

in the same function:

Code: [Select]
// the following line was not found in Simple Portal Extra Shoutbox Options v1.71 to v1.72 upgrade, it was removed and replaced by the line after it:
//              <timeclean>', htmlspecialchars(strip_tags($shout['time'])), '</timeclean>
                <timeclean>', $smcFunc['htmlspecialchars'](strip_tags($shout['time'])), '</timeclean>

Code: [Select]
// the following line was not found in Simple Portal Extra Shoutbox Options v1.71 to v1.72 upgrade, it was removed and replaced by the line after it:
//              <content>', htmlspecialchars($shout['text']), '</content>
                <content>', $smcFunc['htmlspecialchars']('<span style="word-wrap: break-word;overflow-y: auto;overflow-x: hidden;">'), $smcFunc['htmlspecialchars']($shout['text'], ENT_QUOTES), $smcFunc['htmlspecialchars']('</span>'), '</content>

You have resolved my problem (it just needed a single page reload to translate the special chars).

THANK YOU !
Title: Re: minor Shoutbox bug that converts quotes into "&quot;"
Post by: aegersz on June 30, 2018, 09:28:59 PM
*bump*

i have modified the previous post to add the $smcFunc global definition
Title: Re: minor Shoutbox bug that converts quotes into "&quot;"
Post by: Chen Zhen on June 30, 2018, 11:17:20 PM
Imo you're doing a bunch of manual changes to files, possibly missing some edits or doing incorrect ones so I can't be sure what is happening.
I can give you some simple advise...

Uninstall all Simple Portal plug-ins & then uninstall Simple Portal.
Afterward install Simple Portal 2.3.7 anew and then install the most recent versions of your Simple Portal plug-ins.
This should get you back to square one without having to manually edit anything because the initial new install of SP 2.3.7 will not have any of your manual edits.

BTW - I updated the shoutbox options plug-in to v1.73 located ~here~ (https://web-develop.ca/index.php?action=downloads;area=stable_simple_portal_plugins;file=25)


Just to confirm all works well without any need for manual parsing if you are doing things correctly:

No conflicts & no manual edits required for all of the above. All functioning perfectly including shoutbox audio.
I do not know if you use all the above plug-ins but I do know you are using some of them.
Simply use the ones you want & I can tell you with certainty that there are no conflicts with what is listed above.

If you use SP-Shoutbox Options v1.73 and alter its regex input incorrectly then this can result in improper shoutbox behavior.
This of course will be of your own doing if you do not know how to enter proper regex.
There is an option to reset regex settings to the defaults if you mess it up.
Title: Re: minor Shoutbox bug that converts quotes into "&quot;"
Post by: aegersz on July 01, 2018, 03:20:12 AM
right now i am happy with it but thanks anyway  :)
SimplePortal 2.3.8 © 2008-2024, SimplePortal