mirror of https://github.com/voidlizard/hbs2
wip, fixed? encoding
This commit is contained in:
parent
a66670d580
commit
12dc7ff031
|
@ -17,6 +17,8 @@ import Data.Maybe
|
||||||
import Lucid (Html,HtmlT,toHtml,toHtmlRaw)
|
import Lucid (Html,HtmlT,toHtml,toHtmlRaw)
|
||||||
import Lucid.Html5 hiding (for_)
|
import Lucid.Html5 hiding (for_)
|
||||||
import Data.Text qualified as Text
|
import Data.Text qualified as Text
|
||||||
|
import Data.Text.Lazy.Encoding as TLE
|
||||||
|
import Data.Text.Lazy qualified as TL
|
||||||
import Text.InterpolatedString.Perl6 (q)
|
import Text.InterpolatedString.Perl6 (q)
|
||||||
import Data.ByteString.Lazy.Char8 qualified as LBS
|
import Data.ByteString.Lazy.Char8 qualified as LBS
|
||||||
import System.FilePath
|
import System.FilePath
|
||||||
|
@ -66,7 +68,7 @@ button.search svg {
|
||||||
body, html {
|
body, html {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -363,9 +365,9 @@ pluginPage api method' = do
|
||||||
<&> join
|
<&> join
|
||||||
<&> fromMaybe mempty
|
<&> fromMaybe mempty
|
||||||
|
|
||||||
let str = LBS.unpack r
|
let str = TLE.decodeUtf8 r & TL.unpack
|
||||||
|
|
||||||
let stripped = extractBodyHtml str
|
let stripped = extractBodyHtml str & TL.pack & TLE.encodeUtf8
|
||||||
|
|
||||||
rootPage $ do
|
rootPage $ do
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue