Freelinking interferes with http: links containing CamelCasedWords
florisla - February 7, 2006 - 12:31
| Project: | freelinking |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
When I put 'regular' http a link into a node's content, and the link contains a CamelCased word, then the freelinking module tries to make a link of the CamelWord *inside* of the http:// link. This of course is not without consequenses for the original link!
Now, the easy workaround would be to make that http: link all lowercase. However, some wiki platforms are case sensitive so this is not always possible.
I've lookad at the regular expression for freelinking and it searches for CamelCases between word boundaries. The problem comes down to the fact that a slash in a URL is also considered a word boundary.

#1
This continues to be an issue.
[[wp>Interwiki|InterWiki]]or [[http://wikipedia.org/wiki/Interwiki|InterWiki]] causes the links to be freelinking/InterWiki. I will look further at this in the code.#2
Could you try changing line 257 to this:
<?php$camelcaseregexp = '/( |^)([[:upper:]][[:lower:]]+){2,}\b/';
?>
And see if that takes care of it? This new RegEx requires the CamelCase to follow a space or beginning of a line. It seems to work in my testing, but I'd like some confirmation before I commit it.
#3
The following also breaks:
[[Something CamelCase Here|ThePage]]
#4
@ecalos: Not recommended practice. It is as nightmarish as spaces in filenames and directories.
#5
Fixed in freelinking-6.x-1.7. Please verify and close.
#6
Automatically closed -- issue fixed for two weeks with no activity.