WordPress.org

Forums

Copy of the Word and past in editor WYSIWYG is with comments that appear in IE (1 post)

  1. newboxters
    Member
    Posted 8 years ago #

    I would like to know somebody has a solution for the problem, that happens, it is that I use WordPress in a blog in that several columnists use the Microsoft Mord for its format/edit posts, and to the necklace in the text editor (WYSIWYG) they come with comments of the Word that don't appear in the firefox, they are interpreted as comment, but for IE they appear:

    <!--[if !supportEmptyParas]-->
    <!--[endif]-->
    <!--[if !vml]-->

    Does anybody know because it happens this, it has some suggestion to solve this problem?

    See what I tried to do but gave mistake (it didn't remove the comments):

    $content = the_content();
    $content = str_replace("<!--[if !supportEmptyParas]-->", "", "$content");
    $content = str_replace("<!--[endif]-->", "", "$content");
    $content = str_replace("<!--[if !vml]-->", "", "$content");
    echo "$content";

    *And:

    $content = "test 2 e 2a";
    $content = str_replace("2", "", "$content");
    echo "$content";

    exhibit: "test e a"

    Could anybody inform me in what file the function " the_content() " of the wordpress?

    I also tried to use other ways with functions of the php to substitute terms:

    $content = the_content();
    echo preg_replace('/<!--(.|\s)*?-->/', '', $content);

    But the problem is that he doesn't get to interfere in what it is printed in the function the_content (), that if I know in that file is demonstrated that function (not in single.php of the template that I place her, but yes, in the file that she is described), perhaps I can publish it in its origin.

    Or if somebody already passed that and has the solution, I thank.

Topic Closed

This topic has been closed to new replies.

About this Topic