Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Slight oddity in the formatting of sigs  (Read 4388 times)

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43588
  • Penguins CAN fly
    • DSLstats
Slight oddity in the formatting of sigs
« on: April 28, 2009, 11:14:47 AM »

If you include certain punctuation marks (such as an apostrophe) in a sig, the forum adds backslashes in front of the mark and if you remove them the forum software puts them back. I've noticed this on other forums, so it's not unique to this one. Is there a way to get round this little problemette?
Logged
  Eric

admin

  • Administrator
  • Member
  • *
  • Posts: 82
Re: Slight oddity in the formatting of sigs
« Reply #1 on: April 28, 2009, 12:42:21 PM »

test
Logged
It´s a test signature

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33884
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: Slight oddity in the formatting of sigs
« Reply #2 on: April 28, 2009, 12:49:45 PM »

Seems to be a problem with the formatting.

I've even tried using the ascii / html character, yet it still puts in the trailing backslash :(
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43588
  • Penguins CAN fly
    • DSLstats
Re: Slight oddity in the formatting of sigs
« Reply #3 on: April 28, 2009, 01:10:01 PM »

The backslash is often used in Linux command lines as an escape character, to include characters which otherwise could confuse the command. For example, if a filename has a space in it, this might be seen as a separator instead of part of the file name, so you can either put the filename in quotes, or you can precede the space with a backslash. I wonder if it's something like that which is being done here.
Logged
  Eric

admin

  • Administrator
  • Member
  • *
  • Posts: 82
Re: Slight oddity in the formatting of sigs
« Reply #4 on: April 28, 2009, 01:13:09 PM »

Yep.

When coding you use the / as an escape character. 
The ' character is also used to surround commands to the SQL server for queries, so I'm wondering if its some sort of security feature to stop malicious code being accepted in signature links, as the / ensure's that its treated as text.
Im still playing to see if I can find a way round it..
« Last Edit: April 28, 2009, 01:56:10 PM by kitz »
Logged
It´s a test signature

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33884
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: Slight oddity in the formatting of sigs
« Reply #5 on: April 28, 2009, 01:40:42 PM »

Whilst not a perfect solution, it may be a workaround to use the ` character

Code: [Select]
`
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

admin

  • Administrator
  • Member
  • *
  • Posts: 82
Re: Slight oddity in the formatting of sigs
« Reply #6 on: April 28, 2009, 01:43:38 PM »

Which although not perfect - it does look better than previously.

Test

It`s a test signature
Logged
It´s a test signature

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33884
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: Slight oddity in the formatting of sigs
« Reply #7 on: April 28, 2009, 01:48:13 PM »

... or this one is even better

Code: [Select]
´


-----------------------------------
The following text entered into the signature box
Code: [Select]
It´s a test signaturewill output

Itīs a test signature
« Last Edit: April 28, 2009, 01:51:56 PM by kitz »
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43588
  • Penguins CAN fly
    • DSLstats
Re: Slight oddity in the formatting of sigs
« Reply #8 on: April 28, 2009, 02:05:04 PM »

The last one looks good. (I've never been a fan of the backtick ` used as an apostrophe.)
Logged
  Eric

mr_chris

  • Kitizen
  • ****
  • Posts: 3774
Re: Slight oddity in the formatting of sigs
« Reply #9 on: April 28, 2009, 02:21:26 PM »

I presume the forum is escaping the single quote with a backslash character. This is to block a simple route to SQL injection attacks.

However, looks like the part of code that fetches the signature from the database, needs to unescape the retrieved text in order to remove backslashes before the sig is displayed, and isn't doing.

Or perhaps it's getting escaped twice and only unescaped once. Don't know without looking at it. Like I say, I'll get onto this after tomorrow :)
Logged
Chris