MyBB Community Forums

Full Version: DVZ Shoutbox :: Quotes around username
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Within the DVZ shoutbox, you can click the user's avatar, and it prints out the @name of the user whose avatar you click, within the text box,

like, if you click an avatar, the action of clicking the avatar inputs the avatar user's name into the textbox,

example,

clicked avatar= @Johhny

Now for the issue::

when you click a user's avatar, it now prints out =@"Johnny"

there are now quotes "" around the user's name like "Johnny"

where as before, it was just the @Johnny

any clue what is goin on?
if user's name has special characters then quotes are added - not to general user names
file: dvz_shoutbox.js Lines: 501-511
 // enclose in quotes if needed
        if (username.match( /["'`\.:\-+=~@#$%^*!?()\[\]{}\s]+/g )) {

            var quotes = ['"', "'", '`'];

            for (var i in quotes) {
                if (username.indexOf(quotes[i]) == -1) {
                    appendix = quotes[i] + username + quotes[i];
                    break;
                }
            }