Support » Requests and Feedback » Bug: <!–[if !IE]>–> converted to <!–[if !IE]>–>

  • 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);

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    (@esmi)

    Forum Moderator

    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.

    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.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug: <!–[if !IE]>–> converted to <!–[if !IE]>–>’ is closed to new replies.