Hi All,
I’ve just found that rendering a mailto: link with html/5.0 syntax strips the mailto:
The email link works correctly when rendered on the page itself no worries. The value is the string with the correct xwiki 2.1 link syntax.
[[email@doamin.com>>mailto:email@domain.com]]
And when using that value else where in the wiki using the below, work and displays as a mailto: link as expected.
$document.getObject('Main.Contacts.Code.ContactsClass').getProperty('email').value
When rendering the same value as html/5.0 the mailto is stripped and xwiki treats it as an wikiexternallink url.
$services.rendering.render($services.rendering.parse($document.getObject('Main.Contacts.Code.ContactsClass').getProperty('email').value, 'xwiki/2.1'), 'html/5.0')
The resulting html is
<p><span class="wikiexternallink"><a href="email@domain.com">email@domain.com</a></span></p>
I found this jira issue which was fixed in 14.0-rc-1 but was for html/4.01. We’re running 14.10.1 and obviously using html/5.0.