Closed Bug 418881 Opened 16 years ago Closed 16 years ago

Need a better way to handle microformat properties that can be text or HTML

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)

There are a couple microformat properties (note in hCard and description in hCalendar) where I have a datatype of "HTML" and I have created a function called toHTML that returns those as HTML. you use the normal toString to get the string representation.

The problem with my approach is that the HTMLGetter returns a JavaScript object, so string function (match, replace) don't work on it.

I need an approach that totally looks like a string, but happens to have toHTML for getting the HTML.
Attached patch Fix with test (obsolete) — Splinter Review
If there is a better way to do this, I'm up for it, but this seems to work in all my testing.
Attachment #304802 - Flags: review?(sayrer)
Attachment #304802 - Flags: review?(sayrer) → review+
Needed a toString function as well. Added a test that explicitly made sure .match worked. This makes sure we're a real string.
Attachment #304802 - Attachment is obsolete: true
Attachment #304805 - Flags: approval1.9?
Comment on attachment 304805 [details] [diff] [review]
Found one small problem and fixed it.

a=beltzner for 1.9
Attachment #304805 - Flags: approval1.9? → approval1.9+
Fix checked in.
Status: NEW → RESOLVED
Closed: 16 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: