lance (thelance) wrote in lj_dev,
lance
thelance
lj_dev

  • Mood:
  • Music:

PATCH: consistancy in converting urls in posts to links (cleanhtml.pl)

currently cleanhtml.pl will convert any url beginning with http to a url. this, however, does not happen if any of the letters in http are capitalized (see examples). this is a fairly trivial issue, since most users will post urls in lower case. but occasionally they don't, and we should be consistant if we are already converting urls to links. so i've changed the reg. exp. that does this to ignore case. it has been tested and seems to work.

examples
before patch:
http://www.livejournal.com/
HTTP://www.livejournal.com/
Http://www.livejournal.com/

after patch: here

diff of the patch:cgi-bin/cleanhtml.pl.diff
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments