YaBB Community and Support Forum
YaBB Home About YaBB Download YaBB YaBB Support Customize Your Forum Development Contribute to the Project
  Welcome, Guest. Please Login or Register


 
Page Index Toggle Pages: 1
Topic Tools
 
Cosmetic: Mark-and-Quote kills double spaces (Read 2,548 times)
 Feb 27th, 2010 at 10:03am
There are no actions to perform.  

cepheid 
Senior Member
****
Offline
Posts: 516


None
Cosmetic: Mark-and-Quote kills double spaces
It looks like, when doing a Mark-and-Quote, any double spaces (two spaces in a row) get entirely deleted.  Single spaces are preserved, but double spaces are deleted rather than simply collapsed.  You can test that by doing a Mark-and-Quote on this paragraph.  All of these sentences are separated by double spaces, and all of those double spaces get zapped, while the single spaces between words are preserved.
 
WWW  
IP Logged  
 Reply #1 - Feb 27th, 2010 at 4:52pm
There are no actions to perform.  
Captain John 
Ex Member


None
Re: Cosmetic: Mark-and-Quote kills double spaces
cepheid wrote on Feb 27th, 2010 at 10:03am:
It looks like, when doing a Mark-and-Quote, any double spaces (two spaces in a row) get entirely deleted.


cepheid wrote on Feb 27th, 2010 at 10:03am:
It looks like, when doing a Mark-and-Quote, any double spaces (two spaces in a row) get entirely deleted.Single spaces are preserved, but double spaces are deleted rather than simply collapsed.


verified
 
 
IP Logged  
 Reply #2 - Feb 28th, 2010 at 10:11am
There are no actions to perform.  

cepheid 
Senior Member
****
Offline
Posts: 516


None
Re: Cosmetic: Mark-and-Quote kills double spaces
This is happening in yabbfiles/YaBB.js, within function get_selection, line 101:
Code Select All
        while (quote_selection[msg_id].indexOf("  ") != -1) quote_selection[msg_id] = quote_selection[msg_id].replace(/  /gi, ""); 


I'm not entirely sure what the purpose of this line is... all it does is strip double-spaces, replacing them with the empty string.  I think this line can safely be removed... I've removed it on my test board with absolutely no ill effects.  Removing that line fixes this problem and doesn't seem to cause any others.

The lines immediately above and below this (lines 100 and 102) are commented out, and should probably also be removed - no need to clutter the files and increase load times.
« Last Edit: Feb 28th, 2010 at 10:15am by cepheid »  
WWW  
IP Logged  
 Reply #3 - Mar 4th, 2010 at 8:29am
There are no actions to perform.  

cepheid 
Senior Member
****
Offline
Posts: 516


None
Re: Cosmetic: Mark-and-Quote kills double spaces
So, as I posted above, if someone wants to just remove that line, it will fix this issue.  Jet, want to commit that change to CVS? Smiley
 
WWW  
IP Logged  
 Reply #4 - Mar 4th, 2010 at 4:02pm
There are no actions to perform.  

Jet Li 
Legacy Dev Team
Development Team
****
Offline
Posts: 6,588
Hong Kong


None
Re: Cosmetic: Mark-and-Quote kills double spaces
New
public_html/yabbfiles/YaBB.js
in CVS.
 
...
PM me for YaBB Installation Service
WWW Jet Li 100000788351637  
IP Logged  
Page Index Toggle Pages: 1
Topic Tools
 

Get Yet another Bulletin Board at SourceForge.net. Fast, secure and Free Open Source software downloads Support This Project BoardMod - YaBB features and templates YaBB Codex - support on installation and usage YaBB Toolbar for your browser

YaBB Facebook Group Page

Vulnerability Scanner

Valid RSS Valid XHTML Valid CSS Powered by Perl
YaBB Chat and Support Community » Powered by YaBB 3.0 Beta!
YaBB Forum Software © 2000-2011. All Rights Reserved.