Forums

RS-Linkify Thread is sticky

Quick find code: 261-262-33-65181208

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Meredith wtf said :
Find the position of each apostrophe and iterate back through the text while the character is still ' \ '


I've been trying to find a nice way to clean up those slashes, I'm not great with regex and after many convoluted, messy attempts that all 'kind of' worked, I decided to take a break.

Then I came up with this...

/\\+(?= \ ')/g

Damn so simple. Version  2.0.9.5 has applied it to both quote text and posts. It should make a big difference. This post is good for a before and after test.

07-Dec-2013 13:26:04 - Last edited on 07-Dec-2013 13:50:49 by Indecent Act

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
MichaeISword said :
Awesome work as always Indy thank you!


Thank you :)

I'm just sorry it's taking me so long to get these things done. I don't have much spare time atm, plus I'm working on a major upgrade of RS-Linkify. These recent forum issues have come at particularly bad time for me. But I'd rather this than have the exploit unpatched. However it has set me back a bit, I'd rather put my spare time into improvements rather than fixes.

I'll just make do, and get on top of it all eventually :)

07-Dec-2013 14:15:10

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
lol Blasty I know exactly what you mean, you should see my regex for linkify url detection.

One sec I'll edit and post it...


Edit:
this is for most links (made from various examples around the web with some of my own modifications)

/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_()|'!:,.;]*[-A-Z0-9+&@#\/%=~_()|])/

this is for youtube (based on something from stackoverflow that I only slightly changed)...

/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/

there are some other routines I run after the matches, but they are trivial by comparison. It gives me a headache just looking at them lol.



07-Dec-2013 14:17:04 - Last edited on 07-Dec-2013 14:25:55 by Indecent Act

Quick find code: 261-262-33-65181208 Back to Top