[jQuery] XHTML limitation or safari bug ?
Find this while setting an email obfuscation trick.
In a xhtml file served as application/xhtml+xml there is a span :
<p>test: <span class="dmsq">click there</span></p>
Given this bit of jquery code:
$(function () {
$('.dmsq').one('click', function () { $(this).load('dmsq.php') });
});
The the dmsq.php:
header('Content-type: application/xhtml+xml');
echo '<a
href="mailto:someone@some.where">someone@some.where</a>';
This code works as expected in every browser when served as text/html. It
works also in application/xhtml+xml capable browsers but Safari (nor
WebKit). There the mail displays correctly but is not clickable and, when
looked at with Web inspector, the element shows element and node DOM
properties but no HTMLelement properties.
First, I though it was du to load/append using innerHTML and responseText
rather than responseXML. So I wrote a replacement code using DOM function.
No way.
Also tried different content type in dmsq.php
Before classifying this as a Safari bug I want to be sure we agree that such
injected link should be correctly seen in true xhtml+xml situation.
If this is a Safari bug it is related to a know one?
--
View this message in context: http://www.nabble.com/XHTML-limitation-or-safari-bug---tf4926746s27240.html#a14101103
Sent from the jQuery General Discussion mailing list archive at Nabble.com.