Posts: 25
Location: ScrapingWeb.com
|
On this page there are many abbreviation / acronym entries: http://abbreviations.wordcrow.com/acronyms/D/
They are generated in PHP:
PHP Code:
<a href="/define/<?php echo rawurlencode($abbreviation['title'])?>/">
<strong><?php echo $abbreviation['title']?></strong>
</a>
I used rawurlencode because many acronyms contain bizarre characters such as #, & and even /.
And the URL requests such as:
http://abbreviations.wordcrow.com/define/DA%26E/
Would first be fed to rawurldecode():
PHP Code:
$acronym = rawurldecode('DA%26E'); // $acronym would be 'DA&E'.
And then used in database queries.
While DA&E is all right, DA/C is not. Try this URL http://abbreviations.wordcrow.com/define/DA%2FC/ and you would end up with http://abbreviations.wordcrow.com/define/DA/C/ which is an error page.
I can extend more code to recognize /define/DA/C/ but it's just weird and non-sensible. I tried both Chrome and Firefox and they all automatically convert DA%2FC to DA/C. But with DA%26E, they don't.
What am I doing wrong? Ain't that / already encoded into '%2F'?? Really weird. Any help would be appreciated!
__________________
Please login or register to view this content. Registration is FREE for webmasters who need the data to get started on niche information sites. Here are Please login or register to view this content. Registration is FREE.
|