WordPress.org

Ready to get started?Download WordPress

Forums

Bug: <!--[if !IE]>--> converted to <!--[if !IE]>–> (4 posts)

  1. Vedmedka
    Member
    Posted 4 years ago #

    I've realized a code
    <!--[if !IE]>-->
    is converted to
    <!--[if !IE]>&#8211;>

    Possible solution:
    in wp-includes/formatting.php in function wptexturize code
    $textarr = preg_split('/(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE);

    replace to

    $textarr = preg_split('/(<!--.*-->)|(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE);

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    1. That code will only be parsed if you enter it within the post content area.

    2. There isn't a <!--[if !IE]>--> conditional comment.

  3. Vedmedka
    Member
    Posted 4 years ago #

    In my posts I have to insert a code like:

    <object classid="clsid:..." width="704" height="1011" id="FlashID" title="...">
           <param name="movie" value="Chapter.swf" />
           <param name="quality" value="high" />
           <param name="wmode" value="opaque" />
           <param name="swfversion" value="9.0.45.0" />
           <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don't want users to see the prompt. -->
           <param name="expressinstall" value="expressInstall.swf" />
           <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
           <!--[if !IE]>-->
           <object type="application/x-shockwave-flash" data="Chapter 14.swf" width="704" height="1011">
             <!--<![endif]-->
             <param name="quality" value="high" />
             <param name="wmode" value="opaque" />
             <param name="swfversion" value="9.0.45.0" />
             <param name="expressinstall" value="scripts/expressInstall.swf" />
             <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
             <div>
               <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
               <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
             </div>
             <!--[if !IE]>-->
           </object>
           <!--<![endif]-->
         </object>

    When WP converts <!--[if !IE]>--> to <!--[if !IE]>&#8211;> Firefox doesn't show the object properly. I suppose this is WP bug.

  4. 1) It's not <!--[if !IE]>-->, it's <!--[if !IE]>. Really: http://msdn.microsoft.com/en-us/library/ms537512%28VS.85%29.aspx

    2) Try this:

    <object classid="clsid:..." width="704" height="1011" id="FlashID" title="...">
           <param name="movie" value="Chapter.swf" />
           <param name="quality" value="high" />
           <param name="wmode" value="opaque" />
           <param name="swfversion" value="9.0.45.0" />
           <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don't want users to see the prompt. -->
           <param name="expressinstall" value="expressInstall.swf" />
           <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
           <!--[if !IE]>
           <object type="application/x-shockwave-flash" data="Chapter 14.swf" width="704" height="1011">
             <![endif]-->
             <param name="quality" value="high" />
             <param name="wmode" value="opaque" />
             <param name="swfversion" value="9.0.45.0" />
             <param name="expressinstall" value="scripts/expressInstall.swf" />
             <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
             <div>
               <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
               <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
             </div>
             <!--[if !IE]>
           </object>
           <![endif]-->
         </object>

    By using <!--[if !IE]>Foo<![endif]-->, you're encasing the WHOLE thing in one comment, which could stop FF etc from borking. With your --> after the IE]>, you were effectively ending the comment.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags