Copied to clipboard

Flag this post as spam?

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


  • Eric Herlitz 97 posts 129 karma points
    Jun 28, 2012 @ 23:59
    Eric Herlitz
    0

    Img tags not posted

    Hi

    When posting images in my forum the images dont get posted, they are removed from and not present in the posted result. Doesnt matter if its a new post, an answer or an edit.

    Any advice where to start?

     

  • Eric Herlitz 97 posts 129 karma points
    Jul 02, 2012 @ 00:16
    Eric Herlitz
    0

    Resolved by changing in the

    ForumEditPost.ascx.cs

    p.getProperty("forumPostContent").Value = Helpers.HtmlEncode(Helpers.GetSafeHtml(txtPost.Text));

    to

    p.getProperty("forumPostContent").Value = Helpers.GetSafeHtml(Helpers.HtmlEncode(txtPost.Text));

    nForumBaseExtensions.cs

    to

    d.getProperty("forumPostContent").Value = Helpers.HtmlEncode(Helpers.GetSafeHtml(tbPost));

    to

    d.getProperty("forumPostContent").Value = Helpers.GetSafeHtml(Helpers.HtmlEncode(tbPost));
    and
    p.getProperty("forumPostContent").Value = Helpers.HtmlEncode(Helpers.GetSafeHtml(tbPost));
    to
    p.getProperty("forumPostContent").Value = Helpers.GetSafeHtml(Helpers.HtmlEncode(tbPost));
    ----

    The Sanitizer seems a bit trippy, removing <img tags is a bit cranky in my opinion.

Please Sign in or register to post replies

Write your reply to:

Draft