+grnbrg Posted July 10, 2007 Share Posted July 10, 2007 I've been putting together a description for a new cache, and have run into a (admittedly minor) issue with the html tidy output... I've entered the following html: While you're here, you might want to give "<a href="http://www.geocaching.com/seek/cache_details.aspx?waypoint=GC12345">Cache Name</a>" a look. Which should result in: While you're here, you might want to give "Cache Name" a look. (Note the placement of the quotes.) The html code produced, however is: While you're here, you might want to give "<a rel="nofollow" href="http://www.geocaching.com/seek/cache_details.aspx?waypoint=12345"> Cache Name</a>" a look. Which displays as: While you're here, you might want to give " Cache Name" a look. (Again, note the quotes.) It looks like the html tidy code his putting a hard line break after the closing angle bracket of the anchor tag, which (at least with my browser) results in a space being inserted at the start of the anchor text. Is it possible for the hamsters to be trained that the ">" character should be treated as non-breaking? Thanks! grnbrg. Link to comment
+Tharagleb Posted July 10, 2007 Share Posted July 10, 2007 Will this work, or am I missing something: While you're here, you might want to give <a href="http://www.geocaching.com/seek/cache_details.aspx?waypoint=GC12345">"Cache Name"</a> a look. Link to comment
+StarBrand Posted July 10, 2007 Share Posted July 10, 2007 Try skipping the quotes in the tag - not really needed anyway.... just a thought.... What browser are you using? Link to comment
+grnbrg Posted July 10, 2007 Author Share Posted July 10, 2007 Will this work, or am I missing something: While you're here, you might want to give <a href="http://www.geocaching.com/seek/cache_details.aspx?waypoint=GC12345">"Cache Name"</a> a look. Depends how you define "work"... I'd like the quotes to remain outside the hyperlink... "Cache Name" not " Cache Name" or "Cache Name" grnbrg. Link to comment
+grnbrg Posted July 10, 2007 Author Share Posted July 10, 2007 Try skipping the quotes in the tag - not really needed anyway.... just a thought.... What browser are you using? Mozilla Seamonkey (same engine that Firefox uses). And the rendering is correct -- there is whitespace (a linebreak) between the ">" of the anchor and the first character of the cache name, so " Cache Name" is how the current code should look. I just can't find a way to eliminate the linebreak at that point. If I use: sample text "<a href="http://www.shorturl.com">Cache Name</a>" sample text the URL is short enough that it doesn't wrap, and the text displays correctly. I could (and might yet) include the quotes as part of the hyperlink, or leave them out entirely, but thought I'd bring it up as a bug report nonetheless. Eliminating the quotes within the tag (ie: <A HREF=http://www...>...</A>) doesn't work, BTW. The html tidy code puts them back. grnbrg. Link to comment
+StarBrand Posted July 10, 2007 Share Posted July 10, 2007 ...The html tidy code puts them back. grnbrg. I should have figured that...... Link to comment
+mtn-man Posted July 10, 2007 Share Posted July 10, 2007 (edited) I don't understand the rel="nofollow". Can you not remove that? That seems to be the problem to me. Edited July 10, 2007 by mtn-man Link to comment
+grnbrg Posted July 10, 2007 Author Share Posted July 10, 2007 (edited) I don't understand the rel="nofollow". Can you not remove that? That seems to be the problem to me. The html tidy adds that, and enforces it's placement before the href="" component, if you try to add it yourself. It tells search engines not to follow the link, so that spammers can't use cache listings to boost the page rank of their viagra sites. ETA: And the href="..." component is too long, and wraps anyway, when the URL is a cache link. grnbrg. Edited July 10, 2007 by grnbrg Link to comment
+mtn-man Posted July 10, 2007 Share Posted July 10, 2007 (edited) I know what it does, I just think you should be able to eliminate it. I've never seen that on any of my cache description links. Edited... Actually I see it on our GGA Page. It doesn't seem needed, but it does not mess up the page. Just trying suggestions. I'll keep thinking about it. Edited July 10, 2007 by mtn-man Link to comment
+Tharagleb Posted July 10, 2007 Share Posted July 10, 2007 What if you coded your own "rel=nofollow" then maybe tidy would leave it alone. Link to comment
+Lil Devil Posted July 10, 2007 Share Posted July 10, 2007 Maybe you could add some other random tag="value" with appropriate name and value to make it wrap the way you want. Link to comment
+grnbrg Posted July 11, 2007 Author Share Posted July 11, 2007 Maybe you could add some other random tag="value" with appropriate name and value to make it wrap the way you want. Sweeet! That works. I didn't now the "tag=" component wouldn't get stripped. Thankyouthankyouthankyou! grnbrg. Link to comment
Recommended Posts