Support Forum

Post anchors

PK pkthree
pkthree
Member

I’ve noticed that there are two anchors for a post:

p110706 and post110706

<div class='spTopicPostSection spOdd spType-Admin spRank-admin spSpecialRank-sp-master' id='post110706'>
<a id='p110706'></a>

Link anchors generated by sp_build_url use p110706. I’ve had reports that such anchors don’t work in IE8 (apparently due to a bug whereby an empty tag isn’t properly recognized as an anchor). The bigger question, though: do we need both anchors? Could we do without the empty <a> tag and just go with post110706 in the div?

3 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

The ‘pXXX’ has been in use since day 1 of SP. Removing it now would cause all kinds of historic links to break and with the exception of what you tell me about IE8, it does work in all decent browsers.

The id in the div has been added as a more useful name and was, I believe, largely put in place to allow for specific styling on a specific post which we have been asked for before now.

I am unsure why you should feel that having both is a problem.

PK pkthree
pkthree
Member

Not so much a “problem” :)  Was mostly checking to see whether one could have been rendered obsolete, but the answer is a resounding no!  I would love to ignore IE8 (heck, Google Apps is doing so) but to appease my site users, I’ve switched sp_build_url to link to the id in the div.

MP Mr Papa
Mr Papa
Member

when IE 10 is released in late October, it wont be long until we stop making all the special changes we do now for IE 8…  just not worth the effort…  supporting two versions of IE is enough… hoping IE 10 finally reaches real browser status!