What about censorship of URLs? -
CompSci87 - 09-18-2012
Fixed! This link will look like it was censored, but will still work:
http://www.onefootdown.com/2011/10/20/2504087/the-tampa-two-defense-and-the-usc-trojans
Technical details for anyone who cares.
(1) I modified the censor function so that anything in < > is not censored. By the time the function is applied, any literal < > that the user typed in has been escaped to < >, so this doesn't provide a way for users to prevent censorship. It just prevents mangling of html tags and their arguments, such as link target URLs.
(2) The preview view parses bbcode and autolinks URLs first, then censors, so the above change worked. But displaying a posted message was censoring first, then parsing bbcode/autolinking, so it didn't work. Yay for consistency. I swapped a few lines of code around to make my change work in both cases.
Re: What about censorship of URLs? -
CompSci87 - 09-18-2012
p.s. Let me know of any problems or places I missed.
One issue occurs if you quote someone else's post that contains a link with censored words. When the quote gets inserted into your draft message, the board software censors it on the way in, in order to avoid offending your tender sensibilities. Then if you post it that way, the link in the quote won't work, though the one in the original message still will. I don't have a good way around this, other than not censoring quotes on the way in.
Re: What about censorship of URLs? -
oman - 09-18-2012
(09-18-2012, 01:46 AM)CompSci87 link Wrote:p.s. Let me know of any ... places I missed.
The rest of the board.
Re: What about censorship of URLs? -
GoodGrief - 09-18-2012
BRILLIANT! Great job, thanks!
Re: What about censorship of URLs? -
Leftcoast - 09-18-2012
Three cheers for Comp Sci majors! Particularly those that graduated in 1987!
Hip, Hip Hooray! Hip, Hip Hooray! Hip, Hip Hooray!
Re: What about censorship of URLs? -
Hank 91 - 09-18-2012
Speaking of CompSci, does anything resembling LOTS still exist at Stanford? I'm guessing that every student arrives on campus with a laptop or iMac nowadays, and for those who don't, the dorms probably still have some shiny new computers. Personally, I loved working at LOTS. I had a few misguided quarters as a CS major before coming to my senses and returning to my English major. Even so, there was no better place to write than LOTS at three in the morning. And those nights when I printed out a paper, hopped on my bike, then pedaled west with the sunrise at my back? Priceless.
Re: What about censorship of URLs? -
oman - 09-18-2012
(09-18-2012, 08:08 PM)Hank 91 link Wrote:Even so, there was no better place to write than LOTS at three in the morning. And those nights when I printed out a paper, hopped on my bike, then pedaled west with the sunrise at my back? Priceless.
I guess I was doing it wrong....
Re: What about censorship of URLs? -
Leftcoast - 09-18-2012
Ah ... those days of waiting up for that free LOTS allocation that began at 2:00 AM. Brings tears to my eyes .... really, it brings tears to my eyes.Â
Re: What about censorship of URLs? -
estephan500 - 09-18-2012
You are a great man!
In previous threads about the URLs, my mind had wandered off into "what if they made it ignore text that had..." and I never got far enough to even express it on the board, let alone have the skill to implement it.
Re: What about censorship of URLs? -
CompSci87 - 09-19-2012
(09-18-2012, 11:20 PM)Leftcoast link Wrote:Ah ... those days of waiting up for that free LOTS allocation that began at 2:00 AM. Brings tears to my eyes .... really, it brings tears to my eyes.
LOTS.... yuck. That made me really grateful to be a grad student in CS, where we had our own computers.
Re: What about censorship of URLs? -
Leftcoast - 09-19-2012
Yeah .... I worked at SRI as a computer operator on Friday and Saturday nights for a year - not because I needed the money but for the free Tops-20 computer time. I could Telnet in to their system from LOTS and do whatever was needed. I also consulted at LOTS for the additional 4-6 hours of allocation. These kids have it easy!