Ugh. I just found out something about this script that ruined my day...
I fixed it though.
It doesn't support square brackets (in my case, used to denote mix information or edit or version info about a song).
Here's the fix:
mycue.gsub!('(', "<(>")
mycue.gsub!(')', "<)>")
mycue.gsub!('[', "<[>")
mycue.gsub!(']', "<]>")
mycue.gsub!("'", "$char(39)")
mycue.gsub!(";", "$char(59)")
mycue.gsub!('"', "$char(34)")
mycue.gsub!('/', "$char(47)")
mycue.gsub!("\r", "$crlf()")
#now final-replace
mycue.gsub!('<(>', "'('")
mycue.gsub!('<)>', "')'")
mycue.gsub!('<[>', "'['")
mycue.gsub!('<]>', "']'")
This should be implemented in a new version of the code.
[a href="index.php?act=findpost&pid=255288"][{POST_SNAPBACK}][/a]
You're right. Actually the code can be shortened a bit:
mycue.gsub!('(', "<(>")
mycue.gsub!(')', "<)>")
mycue.gsub!("'", "$char(39)")
mycue.gsub!(";", "$char(59)")
mycue.gsub!('"', "$char(34)")
mycue.gsub!('/', "$char(47)")
mycue.gsub!("\r", "$crlf()")
#now final-replace
mycue.gsub!('<(>', "'('")
mycue.gsub!('<)>', "')'")
mycue.gsub!('[', "'['")
mycue.gsub!(']', "']'")
The first part
mycue.gsub!('(', "<(>")
mycue.gsub!(')', "<)>")
is there to protect the statements
[code]
mycue.gsub!("'", "$char(39)")
mycue.gsub!(";", "$char(59)")
mycue.gsub!('"', "$char(34)")
mycue.gsub!('/', "$char(47)")
mycue.gsub!("\r", "$crlf()")
with round brackets in them (so they don't get replaced in the after - run. I need to do these replacements afterwards because the ' sign needs to be replaced beforehand... I spent around 4 hours figuring this thing out)
Bella