incorrect URL handling

Bug #302147 reported by Greg Grossmeier
2
Affects Status Importance Assigned to Milestone
Gwibber
Fix Released
Undecided
Greg Grossmeier

Bug Description

Using rev. 149.

This URL was not correctly interpreted by gwibber: http://laconi.ca/trac/wiki/Laconica_0.6.3

If I clicked on the link it took me to "http://laconi.ca/trac/wiki/Laconica_0"

Another one: http://www.google.com/support/news_pub/bin/answer.py?answer=68323&topic=11665 is only linked to "http://www.google.com/support/news_pub/bin/answer"

Interestingly enough it correctly handled this url: http://one.two.three.domain.net/folder/folder/file.one.two.html

Laconica correctly identifies these urls.

Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

I used the URL_PATTERN from: http://bazaar.launchpad.net/~trick/remark/trunk/annotate/54?file_id=transform.py-20070716015216-sz5xqfig9a7i1jdx-1

and replace what was in microblog/support/__init__.py

It now correctly identifies the above examples. Branch with fix linked.

But there is something weird going on with a post from @evan (http://identi.ca/notice/1229122):
"@sigpipe Michael_Elkins">http://re.search.wikia.com/search.html#Michael_Elkins is good, though."

on identi.ca it is formated like: "@sigpipe http://re.search.wikia.com/search.html#Michael_Elkins is good, though."

Obviously not handling the "#" correctly.

Changed in gwibber:
assignee: nobody → greg.grossmeier
status: New → In Progress
Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

Got it.

Rev. 151 of that linked branch has the fix.

If you care, explanation below:

It required changing the NICK_PARSE and HASH_PARSE to only match if they are at a new word. That is a hard concept to put in one sentence; example:

NICK_PARSE and HASH_PARSE no longer match:
the "@email" in <email address hidden>
the "#fragment" in http://www.example.com/file.html#fragment

Since the "#fragment" part was matching for a hashtag before, when it called "linkify" it was trying to make a link of #<a class="inlinehash" href="gwibber:tag/fragment">fragment</a> and failing.

Changed in gwibber:
status: In Progress → Fix Committed
Revision history for this message
Ryan Paul (segphault) wrote :

Thanks! I merged this into the main branch.

Changed in gwibber:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.