Print Page | Close Window

Problem quoting/editing emoticons (smileys)

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=21235
Printed Date: 29 March 2026 at 7:00pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Problem quoting/editing emoticons (smileys)
Posted By: ThorSimpson
Subject: Problem quoting/editing emoticons (smileys)
Date Posted: 06 September 2006 at 6:14pm
Just noticed this today (upgraded to latest version yesterday) but not sure if it's a new thing or pre-existing.

Sometimes (and not all the time) when quoting or editing a message with an emoticon in it, it will not show correctly in the edit/quote text box (or after posting the new message).

For instance, when quoting or editing a message with the LOL smiley on it, it comes up with:

[IMG]smileys/smiley36.gif" align="middle" />

But it works properly on some of the posts.  Any thoughts?



I should add that I have the Web Wiz Rich Text Editor (WYSIWYG): disabled.

Thanks! Smile



Replies:
Posted By: WebWiz-Bruce
Date Posted: 06 September 2006 at 7:10pm
Thanks ThorSimpson, this was actually reported yesterday but does effect previous versions.

The problem is coursed by the latest version writes images in XHTML format with a /> on the end and when editing when not using the RTE is has to return the image into BBcode format which is looking for HTML with just > and not /> at the end.

This will be corrected for the next version, but I would recommend using the RTE as it is much nicer than the plain text editor.

If you are worried about security when using the RTE then you needn't be as Web Wiz Forums was the first forum system to use a built in RTE back in 2001 before anyone else so security filters to protect against hacking and Cross Site Scripting (XSS) within the Web Wiz Forums have been built with to work with the RTE and so are extra secure.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: ThorSimpson
Date Posted: 07 September 2006 at 12:55am
Thanks Borq.  I will try the RTE again later tonight. I disabled it because there was a conflict with the style sheet I am using where the background of the RTE field was the same as the background of my page (which is way too dark for the RTE field).  I think it is because I was using a background image but I am not any more so maybe it will work fine.  Either way I'm sure I could find my way through the CSS to create a new custom style.  I'm sure I can get it working tonight.

Thanks for the fast reply and keep up the great work!!!


Posted By: WebWiz-Bruce
Date Posted: 07 September 2006 at 8:16am
The colour of the RTE textarea can be changed through the forums own CSS Styles.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: RanktheSaga
Date Posted: 08 September 2006 at 9:21pm
I was just going to post about this problem.

It also exists with IMG tags as well.

I've tried it with the RTE enabled and disabled and the error exists for both.

So I guess we'll just have to wait for it to be fixed in the next version?

Keep up the good work...

Star

edit: check that.  it does work fine with the RTE enabled but I was testing it on a Mac using Safari which the RTE doesn't seem to support.

So I guess only my Mac Safari users will be affected until a fix is released.


Posted By: slapmonkay
Date Posted: 12 September 2006 at 9:36pm
Borg,
 
My RTE textarea is showing up as my background image this is my RTE CSS settings Background = White. Is there something I am missing?

.WebWizRTEtextarea{
 background-color: #FFFFFF;
 font-size: 12px;
}


Posted By: WebWiz-Bruce
Date Posted: 13 September 2006 at 10:03am
Try setting a blank background image for the RTE area:-

background-image: url();


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: kiklop
Date Posted: 26 September 2006 at 10:05am
I would like to know if there is a fix for this problem. Members of my forum do occasionally get this "/>" thing at the end of the image link.
I'm using the latest forum version and RTE is disabled (i preffer it that way).
Since i didn't updated all files (with the latest version) but only those listed as modifited i would like to know wwhere the fix was performed (if any)

Thank you

-------------
http://www.dyxum.com" rel="nofollow - dyxum.com


Posted By: WebWiz-Bruce
Date Posted: 26 September 2006 at 11:15am
What you would need to do is open the file functions/functions_edit_post.asp in notepad and chnage the code between lines 166 and 192 to:-


'Loop through the message till all or any IMAGE links are converted back into codes
    Do While InStr(1, strMessage, "<img ", 1) > 0
                               
        'Find the start position in the image tag
        lngStartPos = InStr(1, strMessage, "<img ", 1)
                                                           
        'Find the position in the message for the image closing tag
        lngEndPos = InStr(lngStartPos, strMessage, "/>", 1) + 3
       
        'Make sure the end position is not in error
        If lngEndPos - lngStartPos =< 10 Then lngEndPos = lngStartPos + 10
                       
        'Read in the code to be converted back into the forum codes
        strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos)))   
       
        'Place the image tag into the tempoary message variable
        strTempMessage = strMessageLink
       
        'Format the HTML image tag back into forum codes
        strTempMessage = Replace(strTempMessage, "src=""", "", 1, -1, 1)
        strTempMessage = Replace(strTempMessage, "<img ", "        strTempMessage = Replace(strTempMessage, """ />", "">", 1, -1, 1)
       
        'Place the new fromatted codes into the message string body
        strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1)       
    Loop




-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: kiklop
Date Posted: 26 September 2006 at 11:33am
Thanks Borg,

i have updated the code will report back if this isn't working.

-------------
http://www.dyxum.com" rel="nofollow - dyxum.com


Posted By: kiklop
Date Posted: 26 September 2006 at 12:27pm
Borg,

this doesn't work.

Can you please check this line


strTempMessage = Replace(strTempMessage, "<img ", "        strTempMessage = Replace(strTempMessage, """ />", "">", 1, -1, 1)


Thanks

-------------
http://www.dyxum.com" rel="nofollow - dyxum.com


Posted By: WebWiz-Bruce
Date Posted: 26 September 2006 at 4:15pm
Thats the code for the next version to fix this issue, there maybe more changes in the code but it was a bit of a re-write so you may need to wait for the next version to be released or use the RTE.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: edesigner
Date Posted: 05 October 2006 at 3:52pm

 This is the code corrected, you had forgoten to Disable "Forum Codes"  -boRg- Wink, and the last lines destroyed.


'Loop through the message till all or any IMAGE links are converted back into codes  
 Do While InStr(1, strMessage, "<img ", 1) > 0                 
                    
 'Find the start position in the image tag     
  lngStartPos = InStr(1, strMessage, "<img ", 1)           
                                                    
  'Find the position in the message for the image closing tag      
 lngEndPos = InStr(lngStartPos, strMessage, "/>", 1) + 3              

 'Make sure the end position is not in error     
  If lngEndPos - lngStartPos =< 10 Then lngEndPos = lngStartPos + 10                
            
  'Read in the code to be converted back into the forum codes       
strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos)))           
     
  'Place the image tag into the tempoary message variable       
strTempMessage = strMessageLink              

 'Format the HTML image tag back into forum codes      

strTempMessage = Replace(strTempMessage, "src=""", "", 1, -1, 1)
strTempMessage = Replace(strTempMessage, "<img ", "[IMG]", 1, -1, 1)
strTempMessage = Replace(strTempMessage, """ />", "[/IMG]", 1, -1, 1)

       
  'Place the new fromatted codes into the message string body      
 strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1)          
 Loop
 
 
Chris


Posted By: kiklop
Date Posted: 05 October 2006 at 8:46pm
Oh, i apologize for not reporting back about it (i thought i did)
The (corrected) code Chris has just posted is resolving this issue (I’m using it for a week now and it’s working great)


-------------
http://www.dyxum.com" rel="nofollow - dyxum.com


Posted By: javi712
Date Posted: 09 October 2006 at 11:48pm
Hello,

I noticed that this is also happening each time a member edits thir profile. If they have an image code in the signature window, the code will reset to /> and remove the [/img].

Does this piece of code also correct the page that deals with the profile?

Thanks in advance!


Posted By: WebWiz-Bruce
Date Posted: 10 October 2006 at 8:06am
Yes

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: bad5star
Date Posted: 15 December 2006 at 5:50pm
Hi

can anyone tell me EXACTLY what page I need to go and modify this code below to fix the problem

Thank you in advance for your time

B5


Originally posted by edesigner edesigner wrote:

 This is the code corrected, you had forgoten to Disable "Forum Codes"  -boRg- Wink, and the last lines destroyed.


'Loop through the message till all or any IMAGE links are converted back into codes  
 Do While InStr(1, strMessage, "<img ", 1) > 0                 
                    
 'Find the start position in the image tag     
  lngStartPos = InStr(1, strMessage, "<img ", 1)           
                                                    
  'Find the position in the message for the image closing tag      
 lngEndPos = InStr(lngStartPos, strMessage, "/>", 1) + 3              

 'Make sure the end position is not in error     
  If lngEndPos - lngStartPos =< 10 Then lngEndPos = lngStartPos + 10                
            
  'Read in the code to be converted back into the forum codes       
strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos)))           
     
  'Place the image tag into the tempoary message variable       
strTempMessage = strMessageLink              

 'Format the HTML image tag back into forum codes      

strTempMessage = Replace(strTempMessage, "src=""", "", 1, -1, 1)
strTempMessage = Replace(strTempMessage, "<img ", "strTempMessage = Replace(strTempMessage, """ />", "">", 1, -1, 1)

       
  'Place the new fromatted codes into the message string body      
 strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1)          
 Loop
 
 
Chris


Posted By: edesigner
Date Posted: 15 December 2006 at 6:25pm
functions_edit_post.asp


Posted By: bad5star
Date Posted: 15 December 2006 at 7:14pm
Originally posted by edesigner edesigner wrote:

functions_edit_post.asp


Thank you friend.Big%20smile


Posted By: bad5star
Date Posted: 15 December 2006 at 7:51pm
Originally posted by edesigner edesigner wrote:

 This is the code corrected, you had forgoten to Disable "Forum Codes"  -boRg- Wink, and the last lines destroyed.


'Loop through the message till all or any IMAGE links are converted back into codes  
 Do While InStr(1, strMessage, "<img ", 1) > 0                 
                    
 'Find the start position in the image tag     
  lngStartPos = InStr(1, strMessage, "<img ", 1)           
                                                    
  'Find the position in the message for the image closing tag      
 lngEndPos = InStr(lngStartPos, strMessage, "/>", 1) + 3              

 'Make sure the end position is not in error     
  If lngEndPos - lngStartPos =< 10 Then lngEndPos = lngStartPos + 10                
            
  'Read in the code to be converted back into the forum codes       
strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos)))           
     
  'Place the image tag into the tempoary message variable       
strTempMessage = strMessageLink              

 'Format the HTML image tag back into forum codes      

strTempMessage = Replace(strTempMessage, "src=""", "", 1, -1, 1)
strTempMessage = Replace(strTempMessage, "<img ", "strTempMessage = Replace(strTempMessage, """ />", "">", 1, -1, 1)

       
  'Place the new fromatted codes into the message string body      
 strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1)          
 Loop
 
 
Chris



The above code only fixed the [/IMG] problem.. no more />

BUT

the sig still doesnt show when user posts in a thread... it shows in profile ONLY

help - thanks


Posted By: mrg1
Date Posted: 17 March 2007 at 9:32pm
I've checked briefly the forum amd this seems to be closest match of my problem:
When a user insert this code as signature:
[_IMG_]http://tickers.TickerFactory.com/ezt/d/4;10501;4/st/20070404/e/Examen/dt/6/k/3ce0/event.png[/_IMG_]
and presses preview it shows like image's path is following:
[_IMG_]http://tickers.tickerfactory.com/ezt/d/4105014/st/20070404/e/Examen/dt/6/k/3ce0/event.png[/_IMG_]
Those semicolons are trimmed. I'm using 8.05 version...


Posted By: MrMellie
Date Posted: 19 March 2007 at 1:36pm
mrg1, your problem isn't related to the quote bug (which IIRC is fixed in 8.05). It's down to the security in place to prevent SQL injection and XSS. The semi-colon get's stripped out to help prevent injection attacks. There's not a lot you can really do about it. If you disabled the code that did it, then you'd be making a hole in the WWF security on your forum, not something that's advisable.


Posted By: mrg1
Date Posted: 19 March 2007 at 8:34pm
I guessed that was the reason... An workaround is to insert by myself the code into db, using sql manager, but I was hopping it might be something else... Unfortunately, a lot of signatures coming from tickerfactory will generate this problem...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net