on master help sign in
Added stripping html tags from search result title

In the future, we could keep certain tags like bold. For now, stripping is the most sane solution.

commite5653bf29767c4240cf1762b18c774f5a244ee65 authorEvangelos Lamprou <e.lamprou@upnet.gr> dateTue 17 Oct 2023, 16:26 (3 years ago) parent565f8bc
2 files changed+5−2
frontend/elm.json+2 frontend/src/Main.elm+3−2
frontend/elm.json+2
@@ -21,7 +21,9 @@
2121 "elm/url": "1.0.0",
2222 "elm-community/list-extra": "8.7.0",
2323 "elm-community/maybe-extra": "5.3.0",
24+ "elm-community/string-extra": "4.0.1",
2425 "figbus/elm-urbit-api": "4.0.1",
26+ "hecrj/html-parser": "2.4.0",
2527 "ianmackenzie/elm-1d-parameter": "1.0.1",
2628 "ianmackenzie/elm-3d-camera": "3.1.0",
2729 "ianmackenzie/elm-3d-scene": "1.0.1",
frontend/src/Main.elm+3−2
@@ -29,6 +29,8 @@ import Html.String
2929import List
3030import Css
3131import Html.Styled.Attributes exposing (css)
32+import Html.Parser
33+import String.Extra exposing (stripTags)
3234
3335
3436url : String
@@ -256,10 +258,9 @@ view model =
256258 , Html.Attributes.style "padding" "0.5em" |> htmlAttribute
257259 , Html.Attributes.class "result" |> htmlAttribute
258260 ]
259− [ text title
261+ [ text (stripTags title)
260262 |> el
261263 [ Font.size 16
262− , width fill
263264 ]
264265 , text link
265266 |> el