Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Reply preview bug (Read 3339 times)
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Re: Reply preview bug
Reply #5 - Oct 23rd, 2014 at 7:33pm
Print Post  
Dandello wrote on Oct 23rd, 2014 at 7:23pm:
Okay - currently testing a fix - during the quote truncation process it counts the number of code open and code close tags, compares them and if there are more opens than closes, adds a close code tag just in front of the end quote tag.

Other unclosed tags due to truncation are a nuisance but aren't likely to completely trash the rendering.


Works better here... Doesn't mangle the output like before. I think we need to deal with the other unclosed tags when and if we notice them causing any trouble.
  
Back to top
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Reply preview bug
Reply #4 - Oct 23rd, 2014 at 7:23pm
Print Post  
Okay - currently testing a fix - during the quote truncation process it counts the number of code open and code close tags, compares them and if there are more opens than closes, adds a close code tag just in front of the end quote tag.

Other unclosed tags due to truncation are a nuisance but aren't likely to completely trash the rendering.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Reply preview bug
Reply #3 - Oct 23rd, 2014 at 5:46am
Print Post  
Okay, I was able to reproduce the problem. What's happening is when a quote is too long, it gets truncated. But if it's quoted code, the end-tag for the code section gets truncated/removed - which tells YaBB it should be rendered.

Basically, we need to write a 'code tag detector' for quotes so that code tags always have end tags.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Re: Reply preview bug
Reply #2 - Oct 23rd, 2014 at 3:53am
Print Post  
Dandello wrote on Oct 22nd, 2014 at 9:25pm:
All I can come up with is: if you're quoting code as long as your permitted characters, Yabb may truncate the '[/code]' or other end tags and that can really mess things up. (But I haven't been able to duplicate getting a '$3' rather than text or an error message. That '$3' will come from YaBBC.pm auto-formatting something.)


That $3 most likely comes from the HTML source of the error page it tries to split instead of the simple subject|message|myname it is supposed to split when returning in the ajax callback. It shouldn't replace the message with the error page when using LivePreview, it should just return HTTP error status, return empty message or truncate it.

I can reproduce this every time I try to quote and reply one of the longer patch posts in the HTML 5 section of this forum. It does throw error popup, but does also mess up the LivePreview big time.
  
Back to top
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Reply preview bug
Reply #1 - Oct 22nd, 2014 at 9:25pm
Print Post  
All I can come up with is: if you're quoting code as long as your permitted characters, Yabb may truncate the '[/code]' or other end tags and that can really mess things up. (But I haven't been able to duplicate getting a '$3' rather than text or an error message. That '$3' will come from YaBBC.pm auto-formatting something.)
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Reply preview bug
Oct 22nd, 2014 at 4:53pm
Print Post  
Preview shows up as "$3" instead of the real quoted text when replying to very long post.

For me is looks like it doesn't escape "|" before sending back...
  

reply.png (Attachment deleted | 42 Downloads )
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint