Journal Journal: One solution to Slashdot splitting urls 2
It's pretty annoying when Slashdot adds those spaces into long urls that people have written in their posts. Makes copy-pasting the url a pain. I have one solution to the problem: A privoxy filter.
The version that I use has been tested with urls that have one space in them, but should also work with very long urls that have two spaces inserted in them. This should take care of a large majority of cases. There may be a way to make it work with any number of spaces > 1, but I really don't have the energy to optimize the regular expression.
The filter consists of these two lines (the page-widening filter screwed with the "pure" code)
s|http://(.{42})<nobr>(.)<wbr></nobr> (.{49})<nobr>(.)<wbr></nobr> ([^\s]+)|$1$2$3|sig
s|http://(.{42})<nobr>(.)<wbr></nobr> ([^\s]+)|$1$2$3$4$5|sig
The remaining spaces are supposed to be there, but if you want, you can replace them with \s.