Last modified: 2010-08-31 13:08:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T26998, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24998 - Handling of Type:Telephone number
Handling of Type:Telephone number
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-31 13:08 UTC by Peder Stray
Modified: 2010-08-31 13:08 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Peder Stray 2010-08-31 13:08:41 UTC
The handling of Type:Telephone number is a bit broken, both with regard to RFC3966, and with the display of the data tagged as such.

RFC3966 states that a tel:-uri in the global-number-form should start with a +, followed by zero or more of '0' .. '9', '-', '.', '(', or ')', then a DIGIT, and then zero or more of the same characters as berfore the required digit.

From what i can see in SMW_DV_URI.php the parser translates space to '-' when between digits, then removes all other spaces.  Then calls isValidTelURI which doesnt recognize '(' or ')' as valid characters in the string.

A more correct way would be to translate ' ' to '-' everywhere and then fold more than one '-' into a single one, and extend isValidTelURI to recognize '(' and ')' as it should.

With regard to the display of these values I think it would be much better if a value tagges with a property of this type got shown as a link to the tel:-uri with the original text as the text shown, both in the page where it is defined and in semantic searches with #ask.

A bonus would of course be pretty-printing of the value tagged with regard to national rules for correct digit-grouping and such.  Some of these rules are quite easy to implement. In +47 we group numbers starting with 4, 8 and 9 as 3-2-3 and all other numbers as 2-2-2-2.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links