<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>14350</bug_id>
          
          <creation_ts>2007-06-23 19:05:50 -0700</creation_ts>
          <short_desc>WordPress: Editor strips paragraph breaks</short_desc>
          <delta_ts>2008-04-18 14:20:52 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Evangelism</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac (PowerPC)</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://wordpress.org/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>13744</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Mayel de Borniol - LeLab.TV">deborniol</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>deborniol</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6527</commentid>
    <comment_count>0</comment_count>
    <who name="Mayel de Borniol - LeLab.TV">deborniol</who>
    <bug_when>2007-06-23 19:05:50 -0700</bug_when>
    <thetext>When typing a post in WordPress 2.2.1 with visual editor activated, line breaks appear in the editor, but are stripped out when saving the post or switching to &quot;Code View&quot;. 

This doesn&apos;t occur when setting WebKit&apos;s UA to Mozilla.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6525</commentid>
    <comment_count>1</comment_count>
    <who name="Mayel de Borniol - LeLab.TV">deborniol</who>
    <bug_when>2007-06-23 19:17:51 -0700</bug_when>
    <thetext>Bug cross posted to : http://trac.wordpress.org/ticket/4521</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6526</commentid>
    <comment_count>2</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2007-06-23 19:22:37 -0700</bug_when>
    <thetext>Behaviour changes to be *almost* correct when using the firefox UA.

It looks like the switch between code and visual mode is stripping out &lt;p&gt; and &lt;br&gt; elements for some reason.

When using firefox UA it looked like it was hiding &lt;br&gt; and &lt;p&gt; in code editing mode, and reinserting them (or something) in visual mode, so something is that logic is probably the cause of the woes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6524</commentid>
    <comment_count>3</comment_count>
    <who name="Mayel de Borniol - LeLab.TV">deborniol</who>
    <bug_when>2007-06-23 19:30:45 -0700</bug_when>
    <thetext>Oliver Hunt&apos;s comment makes sense since that&apos;s the normal behavior in Firefox :
When switching to code editing mode, there are no &lt;p&gt; and &lt;br&gt; (but actual new lines)

But when saving the post, there should &lt;p&gt; and &lt;br&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6520</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-23 23:04:28 -0700</bug_when>
    <thetext>Should this bug block Bug 6627?

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6424</commentid>
    <comment_count>5</comment_count>
    <who name="Mayel de Borniol - LeLab.TV">deborniol</who>
    <bug_when>2007-06-24 16:45:04 -0700</bug_when>
    <thetext>David Kilzer :

In my opinion, it should. It prevents the WP editor from being usable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6413</commentid>
    <comment_count>6</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2007-06-24 20:17:39 -0700</bug_when>
    <thetext>&gt; Should this bug block Bug 6627?

TinyMCE&apos;s advanced editor&apos;s &quot;Show Source&quot; feature doesn&apos;t have this problem, so no, since this seems to be specific to WordPress.  Nevertheless, this bug is real serious, and so we should try to get it addressed asap. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3211</commentid>
    <comment_count>7</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2007-08-01 15:58:58 -0700</bug_when>
    <thetext>&lt;rdar://problem/5368629&gt; WordPress: Editor strips paragraph breaks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3197</commentid>
    <comment_count>8</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2007-08-01 17:13:11 -0700</bug_when>
    <thetext>Looks like the textarea that WordPress uses to submit contains (as children) text nodes and brs:

TEXTAREA	0x1779c6c0 CLASS=mceEditor STYLE=display: none; 
      #text	0x187be120 &quot;foo&quot;
      BR	0x187be150
      BR	0x187be1c0
      #text	0x187be260 &quot;bar&quot;
      BR	0x187be290
      BR	0x187be300
      #text	0x187be3a0 &quot;baz&quot;

But the value() of the textarea is &quot;foobarbaz&quot;.  I made this reduction:

&lt;script&gt;
function foo() {
    textarea = document.getElementById(&quot;textarea&quot;);
    textarea.appendChild(document.createTextNode(&quot;foo&quot;));
    textarea.appendChild(document.createElement(&quot;br&quot;));
    textarea.appendChild(document.createTextNode(&quot;bar&quot;));
}
function bar() {
    alert(textarea.value);
}
&lt;/script&gt;

&lt;textarea id=&quot;textarea&quot;&gt;&lt;/textarea&gt;
&lt;input type=&quot;button&quot; onclick=&quot;foo();&quot;&gt;
&lt;input type=&quot;button&quot; onclick=&quot;bar();&quot;&gt;

And it behaves the same way in FF.  I don&apos;t think this is the right way to submit the content of the editable region.  This seems like a WordPress bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3199</commentid>
    <comment_count>9</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2007-08-01 17:26:38 -0700</bug_when>
    <thetext>Filed a TinyMCE bug:

http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1765800&amp;group_id=103281&amp;atid=635682
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3153</commentid>
    <comment_count>10</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-08-02 06:48:42 -0700</bug_when>
    <thetext>Moving to Evangelism per Comment #8 and Comment #9.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74608</commentid>
    <comment_count>11</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2008-03-21 00:37:24 -0700</bug_when>
    <thetext>Apparently this is fixed in WordPress 2.5, which is set to be released shortly:

http://trac.wordpress.org/ticket/4521
http://blog.wired.com/monkeybites/2008/03/catch-a-sneak-p.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78176</commentid>
    <comment_count>12</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2008-04-18 14:20:52 -0700</bug_when>
    <thetext>Looks like 2.5 was deployed at wordpress.com.  I can no longer reproduce this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>