helga-agentur / drupal-module-email-obfuscator

Drupal Email Obfuscator Module
0 stars 0 forks source link

Clicking an email in a link switches obfuscation on and off #8

Closed fxstr closed 1 year ago

fxstr commented 1 year ago

Every click on an email address changes its obfuscation state (in the href attribute): from reversed to non-reversed to reversed. We must make sure that onclick, we only de-obfuscate once. Solution is not clear at the moment (because onclick handlers only accept JS expressions, not full featured instructions).

fxstr commented 1 year ago

Maybe: !this.dataset.obfuscated && this.dataset.obfuscated = true && this.setAttribute('href', a.getAttribute('href').split('').reverse().join(''))

fxstr commented 1 year ago

Maybe: Also add onmouseover

hudsonmuff commented 1 year ago

Fixed with https://github.com/joinbox/drupal-module-email-obfuscator/pull/12 (v2.2.0 & v1.2.0)