mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug #433759 - Microformats - handle empty hCalendar description
r=sayre
This commit is contained in:
parent
61ce0471a4
commit
c028e1969c
@ -494,8 +494,8 @@ var Microformats = {
|
|||||||
/* but also has a new function that can return the HTML that corresponds */
|
/* but also has a new function that can return the HTML that corresponds */
|
||||||
/* to the string. */
|
/* to the string. */
|
||||||
function mfHTML(value) {
|
function mfHTML(value) {
|
||||||
this.valueOf = function() {return value.valueOf();}
|
this.valueOf = function() {return value ? value.valueOf() : "";}
|
||||||
this.toString = function() {return value.toString();}
|
this.toString = function() {return value ? value.toString() : "";}
|
||||||
}
|
}
|
||||||
mfHTML.prototype = new String;
|
mfHTML.prototype = new String;
|
||||||
mfHTML.prototype.toHTML = function() {
|
mfHTML.prototype.toHTML = function() {
|
||||||
|
@ -174,6 +174,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="vevent" id="empty-description">
|
||||||
|
<span class="description"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
@ -295,6 +300,9 @@ function test_hCard() {
|
|||||||
hcalendar = new hCalendar(document.getElementById("18-component-vevent-uid.5"));
|
hcalendar = new hCalendar(document.getElementById("18-component-vevent-uid.5"));
|
||||||
|
|
||||||
hcalendar = new hCalendar(document.getElementById("19-calendar-attachments"));
|
hcalendar = new hCalendar(document.getElementById("19-calendar-attachments"));
|
||||||
|
|
||||||
|
hcalendar = new hCalendar(document.getElementById("empty-description"));
|
||||||
|
is (hcalendar.description, "", "Empty description");
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user