Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Amri 214 posts 740 karma points
    Mar 12, 2020 @ 07:41
    David Amri
    0

    Search field contains html tags

    Hi,

    I'm trying to render "FileTextContent" of a pdf file in my search results. The content of the pdf includes html tags here and there. Like this:

    "Den HTML <script> tag som refererar..."
    

    The script tag in this case is never closed since it's not written to be valid HTML. This causes havoc on the rendered search result page and the html getts messed up.

    I've tried making the field as Html.Raw but I'm still getting syntax errors.

    @Html.Raw(@item.Fields["FileTextContent"].ToString())
    

    Help would be much appreciated.

Please Sign in or register to post replies

Write your reply to:

Draft