WordPress.org

Forums

CM Answers
Problem with CM Answer when posting Coding in it. (4 posts)

  1. ParthGupta
    Member
    Posted 2 years ago #

    I use SyntaxHighlighter and it works fine everyehere except in CM Answers. Also pre tags didn't works properly. Please tell me a way to integrate it with syntaxHighlighter.

    Thanks in advance.

    http://wordpress.org/extend/plugins/cm-answers/

  2. CM Plugins
    Member
    Plugin Author

    Posted 2 years ago #

    We have removed code suppor from regular plugin and now only support this in pro plugin. For SyntaxHighlighter you can remove text filtering so everything will padd throught

    Look for wp_kses function in /lib/models/AnswerThread.php (appears twice) and make sure it does not remove any tags. This way you can bypass the current filtering and let SyntaxHighlighter to work

  3. ParthGupta
    Member
    Posted 2 years ago #

    sorry but could you please explain it (I am a newbie to PHP)

  4. CM Plugins
    Member
    Plugin Author

    Posted 2 years ago #

    You need to replace

    $content = trim(wp_kses($data['content'],
    array(
    'a' => array(
    'href' => array(),
    'title' => array()
    ),
    'em' => array(),
    'strong' => array(),
    'b' => array(),
    'pre' => array()
    )));

    With
    $content = $data['content'];

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • CM Answers
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic