https://bugzilla.wikimedia.org/show_bug.cgi?id=20503
Summary: Handling of tel: URIs in SMW is broken
Product: MediaWiki extensions
Version: any
Platform: All
URL: http://semanticweb.org/index.php?title=Property:Foaf:pho
ne&from=Onotlogies%2FHCONE-metaOntologies#SMWResults
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Normal
Component: Semantic MediaWiki
AssignedTo: [email protected]
ReportedBy: [email protected]
Handling of tel: URIs, like for foaf:phone, is broken, as evident from the
linked URL. Obviously there is some code that tries to turn arbitrary input
into a valid URI, but it only tries to generate HTTP URIs, which gives funky
results if a phone number was entered.
Entering a valid tel: URI also doesn't quite work, because the "+" character is
escaped as "%2B" -- see the phone number of Richard Cyganiak in the linked
page.
I've written some code to help fixing the issue. It's attached. It's not a
patch, as I'm not familiar with SMW internals, but it should be helpful in
fixing this issue. It consists of a function that
1. will take a string as input,
2. will try to recognize if it's a phone number (written as a tel URI or simply
as numbers),
3. will turn the phone number into a valid tel URI and return it,
4. or return null if it cannot be recognized as a phone number.
It's well-tested and closely follows the relevant RFC. I suggest adding this
into the function that tries to generate valid URIs from user input.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l