[wp-trac] [WordPress Trac] #9716: Wordpress Theme/Plugin editor adds blank lines
WordPress Trac
wp-trac at lists.automattic.com
Fri Mar 16 01:29:57 UTC 2012
#9716: Wordpress Theme/Plugin editor adds blank lines
-----------------------------------------+------------------------------
Reporter: Vistronic | Owner: anonymous
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 2.7.1
Severity: normal | Resolution:
Keywords: has-patch reporter-feedback |
-----------------------------------------+------------------------------
Comment (by azaozz):
Replying to [comment:7 SergeyBiryukov]:
> Sounds like Dreamweaver doesn't autodetect EOL properly...
Seems line breaks have to be normalized when saving edited files. Also if
line breaks are `\r`, the theme or plugin "header" becomes inaccessible.
This is browser and OS dependent but seems all modern browsers work with
`\n` line breaks in a textarea. So the patch can be as simple as:
{{{
srt_replace( array("\r\n"' "\r"), "\n", $content );
}}}
Related #20248
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9716#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list