Discussion:
[hakyll] hakyll rewriting <a> tags with e-mail addresses (mailto:)
c***@gmail.com
2016-06-18 01:50:36 UTC
Permalink
Hi all,

I opened an issue but I think I should ask here as well.

It seems like Hakyll is rewriting anchor tags that contain "mailto" links.
It replaces the tag with a <script> block that writes the tag dynamically.
It also includes a <noscript> version with a strangely formatted version of
the e-mail. I've been searching for information about this and getting
stuck.

Can anyone tell me where this is happening and how I can disable or modify
it?

The behaviour is defective because it does not properly rebuild the a tag.
Any attributes, such as classes, that existed on the a tag disappear. It's
also incredibly frustrating behaviour. It should never silently rewrite
user content like this, *especially* if it means including javascript in
the page and enforcing a weird e-mail format in the noscript tag. But I
can't for the life of me figure out where this is happening. Does it even
happen in Hakyll, or is an import responsible for it?

Thanks,
Chris
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jan Tojnar
2016-06-20 12:14:29 UTC
Permalink
Hello,

that is Pandoc’s doing. You can disable it by changing
`writerEmailObfuscation` in
[`WriterOptions`](https://hackage.haskell.org/package/pandoc-1.17.1/docs/Text-Pandoc-Options.html#t:WriterOptions).

Could you please also report it in [pandoc bug
tracker](https://github.com/jgm/pandoc/issues)?

Thanks,
Jan
Post by c***@gmail.com
Hi all,
I opened an issue but I think I should ask here as well.
It seems like Hakyll is rewriting anchor tags that contain "mailto" links.
It replaces the tag with a <script> block that writes the tag dynamically.
It also includes a <noscript> version with a strangely formatted version of
the e-mail. I've been searching for information about this and getting
stuck.
Can anyone tell me where this is happening and how I can disable or modify
it?
The behaviour is defective because it does not properly rebuild the a tag.
Any attributes, such as classes, that existed on the a tag disappear. It's
also incredibly frustrating behaviour. It should never silently rewrite user
content like this, *especially* if it means including javascript in the page
and enforcing a weird e-mail format in the noscript tag. But I can't for the
life of me figure out where this is happening. Does it even happen in
Hakyll, or is an import responsible for it?
Thanks,
Chris
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
chris.kahn via hakyll
2016-06-20 14:04:40 UTC
Permalink
Thanks, I'll try this option and report the bug there.
Post by Jan Tojnar
Hello,
that is Pandoc’s doing. You can disable it by changing
`writerEmailObfuscation` in
[`WriterOptions`](
https://hackage.haskell.org/package/pandoc-1.17.1/docs/Text-Pandoc-Options.html#t:WriterOptions).
Could you please also report it in [pandoc bug
tracker](https://github.com/jgm/pandoc/issues)?
Thanks,
Jan
Post by c***@gmail.com
Hi all,
I opened an issue but I think I should ask here as well.
It seems like Hakyll is rewriting anchor tags that contain "mailto"
links.
Post by c***@gmail.com
It replaces the tag with a <script> block that writes the tag
dynamically.
Post by c***@gmail.com
It also includes a <noscript> version with a strangely formatted version
of
Post by c***@gmail.com
the e-mail. I've been searching for information about this and getting
stuck.
Can anyone tell me where this is happening and how I can disable or
modify
Post by c***@gmail.com
it?
The behaviour is defective because it does not properly rebuild the a
tag.
Post by c***@gmail.com
Any attributes, such as classes, that existed on the a tag disappear.
It's
Post by c***@gmail.com
also incredibly frustrating behaviour. It should never silently rewrite
user
Post by c***@gmail.com
content like this, *especially* if it means including javascript in the
page
Post by c***@gmail.com
and enforcing a weird e-mail format in the noscript tag. But I can't for
the
Post by c***@gmail.com
life of me figure out where this is happening. Does it even happen in
Hakyll, or is an import responsible for it?
Thanks,
Chris
--
You received this message because you are subscribed to the Google
Groups
Post by c***@gmail.com
"hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by c***@gmail.com
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...