Log in

View Full Version : what is the difference between these two addresses?



james438
09-14-2012, 11:33 PM
<?php
$a="http://www.will-law.org/home/Case-Updates/2012/09/14/BREAKING-NEWS---Dane-County-Judge-Declares-Significant-Portions-of-Act-10-Unconstitutional";
$b="http://www.will-law.org/home/Case-Updates/2012/09/14/BREAKING-NEWS---Dane-County-Judge-Declares-Significant-Portions-of-Act-10-Unconsti*tutional";

if ($a==$b) echo "the same";
echo '<a href="http://www.will-law.org/home/Case-Updates/2012/09/14/BREAKING-NEWS---Dane-County-Judge-Declares-Significant-Portions-of-Act-10-Unconstitutional">a</a>
<br><a href="http://www.will-law.org/home/Case-Updates/2012/09/14/BREAKING-NEWS---Dane-County-Judge-Declares-Significant-Portions-of-Act-10-Unconsti*tutional">b</a>'
?>

I have not figured it out, but here is a hint. They both go to two different addresses. When I posted it as code the second link shows an A with a halo over it between the i and t of constitutional.

djr33
09-14-2012, 11:36 PM
There's an asterisk (*) in the second one. This is obvious when they're presented in a monospace font, as in the code example in your post.
Was there a deeper question than this?

There's probably some sort of URL rewriting going on on that website, so I don't know exactly what the difference in interpretation might be. The * seems to give a server warning, so maybe it's just not allowed in URLs at all (not sure about that) or maybe the server is being overly cautious with weird URLs.

james438
09-15-2012, 12:12 AM
That wasn't the code I posted....

I have created a temporary file on my website here (http://www.animeviews.com/test27.php).

I just realized that I can try looking at the html entities of the code I posted. When I did ­ showed up. According to wikipedia it is a type of white space I did not know existed called a soft hyphen. It only displays as a hyphen if the line is long enough that the word breaks apart. It also tells the browser where to break the word if it becomes necessary to do so. Otherwise it is invisible. In my case it was apparently not invisible enough.

djr33
09-15-2012, 02:44 AM
Hm, looks like the board automatically translated that character into *?

I don't see a difference in the links on the HTML page, no.

jscheuer1
09-15-2012, 03:08 AM
Depends upon the browser. Opera shows the second link as ending in:

Unconsti*tutional

Ooops, the board did it again. The * is an  (a capital A with a carrot (^) on top, hex value C2).

Chrome and IE 9 show it as a dash (-).

Firefox doesn't show it at all.

Pasting the link it into a blank page in EditPadPro shows it as a dash (-). The hex value of the character is AD though. A normal dash is 2D.