HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

InputFormatter not working

Hi

Problem: Comment input is not being formatted correctly (both in the preview and in the post).

I'm running Vanilla 2.2 on my local host, which is a clone of a live instillation. Somehow an error crept in on the local version and the comment input is not being formatted correctly.

I've tried:

  • BBCode, markdown, WYSIWYG and HTML render the tags and the text.
  • With Advanced Editor disabled the problem persists.
  • Switched off all plugins except Advanced Editor and no luck.
  • Tested with a different theme and still had the same issue.
  • Checked that config includes $Configuration['Garden']['InputFormatter'] = 'Markdown';

Any ideas where the problem might be? Or could there be a conflict somewhere that's causing this issue?

Tagged:

Comments

  • LincLinc Detroit Admin

    Can you describe what "not being formatted correctly" means in a bit more details?

  • Sure.

    If I add the double * before and after a word to bold it, using markdown, then I get **boldme** instead of boldme.

  • @Linc I've also tried resetting the config, just in case it was something there, and disabling every application that's not Vanilla, so am I right that the issue must be somewhere in my applications/vanilla directory?

  • LincLinc Detroit Admin

    I've never heard of such an issue. Even if the HTML or WYSIWYG input formatter were simply not working, you'd have a security flaw but your browser would still render the output correctly because it's just HTML. To me, it sounds like it's stuck in Text mode. At this point I'd say anything is on the table - a corrupt file, pointing at the wrong config, just about anything.

    RodSloan
  • Cool, that gives me a lot to work with, I appreciate it @Linc, will post what I discover.

  • R_JR_J Ex-Fanboy Munich Admin

    Although I would not know how something like that could happen, but is your "Format" column in GDN_Discussion and GDN_Comment corrupt? The info in this column is responsible for how posts are treated.

  • Thanks @R_J those columns are fine, but it was worth checking.

  • is HtmLawed included in plugins?

    grep is your friend.

    RodSloan
  • You said you disable applciations, have you tries disabling plugins?> @Linc said:

    I've never heard of such an issue. Even if the HTML or WYSIWYG input formatter were simply not working, you'd have a security flaw but your browser would still render the output correctly because it's just HTML. To me, it sounds like it's stuck in Text mode. At this point I'd say anything is on the table - a corrupt file, pointing at the wrong config, just about anything.

    not according to this.

                $Formatter = Gdn::factory('HtmlFormatter');
                if (is_null($Formatter)) {
                    // If there is no HtmlFormatter then make sure that script injections won't work.
                    return self::display($Mixed);
                }
    

    Everything goes through HtmlFormatter unless it is Raw or Display.

    grep is your friend.

    R_JLinc
  • Embarrassed face... I had htmLawed enabled but no plugin, so installing it solved the issue. Thanks for your help @Linc and @R_J

  • And @x00, who nailed it.

  • LincLinc Detroit Admin

    Nicely done, @x00

Sign In or Register to comment.