overenthusiastic bio server url encoding

jwilkinsonjwilkinson Registered Users Posts: 37 Big grins
edited September 30, 2006 in SmugMug Support
I noticed a bit of a problem in how the homepage bio is generated.
I think your server-side code is getting a bit carried away with trying to auto-link what it sees as URLs.

If I put in the following:
Welcome to a photo sharing area for Central Presbyterian Church, Baltimore, Maryland.  You can find our main site at <a href="http://www.centralpc.org/">www.centralpc.org</a> . Enjoy the photos!


Centralites, contact Jeff Wilkinson to share your CPC photos here, to update captions or to have something removed. (<a href="http://www.centralpc.org/admin/privacy.htm#photos" target="_blank">our photo privacy/use policy</a>)
Then it generates this:
<div id="userBio">Welcome to a photo sharing area for Central Presbyterian Church, Baltimore, Maryland.  You can find our main site at <a href="http://www.centralpc.org/"><a href="http://www.centralpc.org">http://www.centralpc.org</a></a> . Enjoy the photos!<br />

<br />
<br />
Centralites, contact Jeff Wilkinson to share your CPC photos here, to update captions or to have something removed. (<a href="http://www.centralpc.org/admin/privacy.htm#photos" target="_blank">our photo privacy/use policy</a>)</div>
Note that it took my already linked first link and wrapped another anchor pair around it. It also made the text have the http://, which I hadnt' wanted. It didn't do this with the privacy policy link, presumably since it didn't have a recognizable URL in the text.

If I try to simplify, and just let SM auto-detect the link as follows:
Welcome to a photo sharing area for Central Presbyterian Church, Baltimore, Maryland.  You can find our main site at www.centralpc.org . Enjoy the photos!


Centralites, contact Jeff Wilkinson to share your CPC photos here, to update captions or to have something removed. (<a href="http://www.centralpc.org/admin/privacy.htm#photos" target="_blank">our photo privacy/use policy</a>)
Then it still insists on expanding the text of the link by adding the http://, which is fairly annoying.
<div id="userBio">Welcome to a photo sharing area for Central Presbyterian Church, Baltimore, Maryland.  You can find our main site at <a href="http://www.centralpc.org">http://www.centralpc.org</a> . Enjoy the photos!<br />

<br />
<br />
Centralites, contact Jeff Wilkinson to share your CPC photos here, to update captions or to have something removed. (<a href="http://www.centralpc.org/admin/privacy.htm#photos" target="_blank">our photo privacy/use policy</a>)</div>
BTW, I had to actually edit that twice, once to save it as something it didn't see as a URL (www2.), then save again for it to stop double-linking it.

The work-around for me personally if I really want it without the http:// and without the double-linking is to do my own linking, but not include the www. in the text of the url... or link it around other text.
Welcome to a photo sharing area for Central Presbyterian Church, Baltimore, Maryland.  You can find our main site at <a href="http://www.centralpc.org/">Centralpc.org</a>. Enjoy the photos!

So, these two aren't huge bugs, but here are the details... so, anyone want to fix them?
jw

Comments

  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited September 30, 2006
    Use <html>
    jwilkinson wrote:
    I noticed a bit of a problem in how the homepage bio is generated.
    I think your server-side code is getting a bit carried away with trying to auto-link what it sees as URLs.

    It's my understanding that if you want Smugmug to leave your description alone and not process it at all, then you need to bracket it with <html> your own HTML here </html>. Those tags are a directive to Smugmug that you've put real HTML in this so it should leave it alone and not process it at all. If you don't put these in, Smugmug assumes, it needs to auto-link things and put in <BR> tags, etc... That's what you are seeing.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • jwilkinsonjwilkinson Registered Users Posts: 37 Big grins
    edited September 30, 2006
    jfriend wrote:
    It's my understanding that if you want Smugmug to leave your description alone and not process it at all, then you need to bracket it with <html> your own HTML here </html>. Those tags are a directive to Smugmug that you've put real HTML in this so it should leave it alone and not process it at all. If you don't put these in, Smugmug assumes, it needs to auto-link things and put in <BR> tags, etc... That's what you are seeing.

    Ah, ok, that makes sense now... I'd gotten odd results with that before.
    That works here as you say.

    thanks,
    jeff
Sign In or Register to comment.