Closed Bug 398676 Opened 17 years ago Closed 17 years ago

Add support for tel: protocol

Categories

(Toolkit Graveyard :: Microformats, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mkaply, Assigned: mkaply)

Details

Attachments

(1 file, 1 obsolete file)

Need to add support for tel: protocol
This patch adds support for the mentioned protocols.

This required a small change to how implied properties work. I wasn't honoring the datatype of the implied property.
Are you following RFC 3966 or 2806, or some bastardized combination of the two?
Probably a bastardization. 

from

http://microformats.org/wiki/hcard-parsing

For the "tel" property in particular, when the element is:

    * <a href="tel:..."> OR <area href="tel:..."> : parse the value of the 'href' attribute, omitting the "tel:" prefix and any "?" query suffix (if present), in the attribute. For details on the "tel:" URL scheme, see RFC 2806. 


Basically I'm just pulling off the tel:/modem:/fax: protocol and using the rest as the phone number with no parsing.
Fixed in Operator. Moving to Microformats core.
Component: Operator → Microformats
Product: Mozilla Labs → Toolkit
QA Contact: operator → microformats
OS: Windows XP → All
Hardware: PC → All
Version: unspecified → Trunk
Comment on attachment 291673 [details] [diff] [review]
Support for tel/modem/fax protocols

This patch isn't doing anything really technically. Just if there is a protocol for a telephone number, strip it and use the rest as a phone number.
Attachment #291673 - Flags: review?(sayrer)
needs tests
Sorry, should have said that. Tests are already in, but commented out in test_Microformats_hcard.html

http://lxr.mozilla.org/seamonkey/source/toolkit/components/microformats/tests/test_Microformats_hCard.html?raw=1
Oh good. Attach a new patch with those and I'll r+.
Attached patch Fix with testsSplinter Review
Yeah with tests is much better. Especially since those tests didn't work at first when I uncommented them.
Attachment #291673 - Attachment is obsolete: true
Attachment #297601 - Flags: review?
Attachment #291673 - Flags: review?(sayrer)
Attachment #297601 - Flags: review? → review+
Attachment #297601 - Flags: approval1.9?
Attachment #297601 - Flags: approval1.9? → approval1.9+
checked in.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: