You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{-# LANGUAGE OverloadedStrings #-}
moduleTestwhereimportText.Blaze.Html5asHimportText.Blaze.Html5.AttributesasAimportText.Blaze.Html.Renderer.Pretty
example =putStr$ renderHtml $ docTypeHtml $doH.head$do
meta ! charset "utf-8"H.title "Test"
body $do
a !A.href "#%41"$"Link"
a !A.id"A"$"Wrong target"
a !A.id"%41"$"Correct target"
The resulting output:
<!DOCTYPE HTML><html><head><metacharset="utf-8"><title>
Test
</title></head><body><ahref="#%41">
Link
</a><aid="A">
Wrong target
</a><aid="%41">
Correct target
</a></body></html>
Note that the href attribute value is not properly encoded, it should be #%2541. The value #%41 is interpreted as a link to A, not as a link to %41.
Is the user of blaze-html expected to perform this encoding manually? I didn't find any information about this in the documentation.
The text was updated successfully, but these errors were encountered:
Consider the following code:
The resulting output:
Note that the href attribute value is not properly encoded, it should be
#%2541
. The value#%41
is interpreted as a link toA
, not as a link to%41
.Is the user of blaze-html expected to perform this encoding manually? I didn't find any information about this in the documentation.
The text was updated successfully, but these errors were encountered: