xss - 'tel' attribute not working in href of anchor tag in rich text editor in classic UI in AEM 6.1 -
i using aem 6.1 sp2 , trying enable 'tel' attribute in href of anchor tag make click call functionality work. have added 'htmlrules' node , links node under htmlrules node 'protocols' property [http://, https://, ftp://, tel:, mailto:, file://]
as specified in link - http://labs.6dglobal.com/blog/2013-01-11/configuring-telephone-tags-within-rich-text-components-and-link-checker/
the 'validatehref' function in rte.js read 'protocols' property , validates 'tel ' attribute valid, not sure why 'tel' attribute not persist in markup when 'ok' clicked in author dialog.
this anchor tag -
<a style="color: #6c6c6c; text-decoration: underline;" class="tel" href="tel:1234 567 891">1234 567 89</a>
and how renders markup on page -
<a style="color: rgb(108,108,108);text-decoration: underline;" class="tel">1234 567 89</a>
this 'htmlrules' node xml -
<htmlrules jcr:primarytype="nt:unstructured"> <serializer jcr:primarytype="nt:unstructured"> <cleanup jcr:primarytype="nt:unstructured"> <pre jcr:primarytype="nt:unstructured" tagstoremove="[\0]"/> <post jcr:primarytype="nt:unstructured" tagstoremove="[\0]"/> <paste jcr:primarytype="nt:unstructured" tagstoremove="[\0]"/> </cleanup> </serializer> <links jcr:primarytype="nt:unstructured" protocols="[http://,https://,ftp://,tel:,mailto:,file://]"/> </htmlrules>
this fixed overlaying xssprotection config file @ -
/libs/cq/xssprotection/config.xml
to
/apps/cq/xssprotection/config.xml
and adding 'tel' attribute in regexp list
<regexp name="telurl" value="tel:[0-9]+"/> <attribute name="href"> <regexp-list> <regexp name="onsiteurl"/> <regexp name="offsiteurl"/> <regexp name="telurl"/> </regexp-list> </attribute>
this has been described in blog @
although has been mentioned in blog , in other places
rendering telephone links in htl based on input rich text widget
https://forums.adobe.com/thread/2329552
that sightly config file present @ -
/libs/sling/xss/config.xml
and not @
/libs/cq/xssprotection/config.xml
and when using sightly component ,
/libs/wcm/foundation/components/text/text.html
even then, overlaying config file @ /libs/sling/xss/config.xml did not have effect, had overlay file @ /libs/cq/xssprotection/config.xml. using aem 6.1 sp2. mysterious ways of aem
Comments
Post a Comment