<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Here's my version:<br>
<a class="moz-txt-link-freetext" href="http://svn.locallylost.com/themes/hybrid-core/trunk/extensions/cleaner-caption.php">http://svn.locallylost.com/themes/hybrid-core/trunk/extensions/cleaner-caption.php</a><br>
    <br>
    It makes sure we're not viewing a feed and does a little extra
    escaping on those attributes.<br>
    <br>
    On 4/21/2011 12:37 PM, Towfiq I. wrote:
    <blockquote
      cite="mid:BANLkTimk33PBdnB6TZ1vZQhsqRT5OS0-3w@mail.gmail.com"
      type="cite"><br>
      <br>
      <div class="gmail_quote">On Thu, Apr 21, 2011 at 11:33 PM, Philip
        Walton <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:philip@philipwalton.com">philip@philipwalton.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#ffffff" text="#000000"> I haven't been
            following this discussion, so sorry if this isn't what you
            were asking, but this is what I do in ALL my themes to make
            the wp-caption div the same width as the img:<br>
            <br>
            <pre><tt>function theme_prefix_wpcaption($x=null, $attr, $content)</tt></pre>
            <pre><tt>{&nbsp;&nbsp;&nbsp; </tt></pre>
            <pre><tt>&nbsp;&nbsp;&nbsp; extract(shortcode_atts( array( 'id' =&gt; '', 'align' =&gt; 'alignnone', 'width' =&gt; '', 'caption' =&gt; '' ), $attr));</tt></pre>
            <pre><tt>&nbsp;&nbsp;&nbsp; if ( 0 &gt;= (int) $width || empty($caption) ) {</tt></pre>
            <pre><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return $content;</tt></pre>
            <pre><tt>&nbsp;&nbsp;&nbsp; }</tt></pre>
            <pre><tt>&nbsp;&nbsp;&nbsp; $id = $id ? 'id="' . $id . '" ' : '';</tt></pre>
            <pre><tt>&nbsp;&nbsp;&nbsp; return '&lt;div ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . $width . 'px"&gt;' . $content . '&lt;div class="wp-caption-wrapper"&gt;&lt;p class="wp-caption-text"&gt;' . $caption . '&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;';</tt></pre>
            <pre><tt>}</tt></pre>
            <pre><tt>add_filter('img_caption_shortcode', '</tt><tt><tt>theme_prefix_</tt></tt><tt>wpcaption', 10, 3);</tt></pre>
            <div>
              <div class="h5"> <br>
                <br>
                On 4/21/11 10:16 AM, Towfiq I. wrote:<br>
              </div>
            </div>
            <span style="white-space: pre-wrap;">
              <div>
                <div class="h5">&gt; @emil<br>
                  <br>
                  &gt; <br>
                  <br>
                  &gt; But the twenty-ten theme is rendering the same
                  thing. The<br>
                  caption<br>
                  <br>
                  &gt; width is automatically added by wordpress and I
                  am not able<br>
                  to<br>
                  <br>
                  &gt; override the default width. :/<br>
                  <br>
                  &gt; <br>
                  <br>
                  &gt; Any suggestion?<br>
                  <br>
                  &gt; <br>
                  <br>
                  &gt; <br>
                  <br>
                  &gt; -- Towfiq I.<br>
                  <br>
                  &gt; <br>
                  <br>
                  &gt; <br>
                  <br>
                  &gt; <br>
                </div>
              </div>
              <br>
              &gt; _______________________________________________<br>
              theme-reviewers
              <div class="im"><br>
                <br>
                &gt; mailing list <a moz-do-not-send="true"
                  href="mailto:theme-reviewers@lists.wordpress.org"
                  target="_blank">theme-reviewers@lists.wordpress.org</a>
                <br>
                <br>
                &gt; <a moz-do-not-send="true"
                  href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
                  target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a></div>
            </span><br>
          </div>
          <br>
          _______________________________________________<br>
          theme-reviewers mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
          <a moz-do-not-send="true"
            href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
            target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <br>
      Thanks for the response Philip, but Emil's solution worked. I knew
      I could rewrite the default wp-caption output but wouldn't want to
      get into that trouble. <br>
      Didn't know css "!important" tag could beat the inline html style.
      Thanks again :)<br>
      <br clear="all">
      <br>
      -- <br>
      <span style="color: rgb(153, 153, 153);">Towfiq I.</span><br>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
theme-reviewers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a>
<a class="moz-txt-link-freetext" href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a>
</pre>
    </blockquote>
  </body>
</html>