Mark down adding white space

edited February 2011 in Bug Reports
Hi,

I noticed that when using a text field type then fuel admin shows the markdown editor if you add text with blank lines between on each save it adds more blank lines.

The white space shows in phpmyadmin table view and in the editor the lines move further apart.

Tried looking for a config option but think it may be a bug.

It doesn't happen on 0.9.1 version.

You can see it happening if you edit a blog post and add a return for a new line and save a few times you'll see the extra blank lines get added.

Comments

  • edited February 2011
    The 0.9.2 did upgrade the MarkItUp! version and I'm wondering if that is causing the issue. The file updated is located at fuel/modules/fuel/assets/js/jquery/plugins/jquery.markitup.pack.js

    I'll check it out on my end too.
  • edited 3:42AM
    OK had a look but not too sure where to look in the file.

    However if i did disable javascript and saved and the extra lines still get added so maybe it's not the editor?
  • edited February 2011
    Actually, I checked that and the jquery version, but that doesn't seem to be the issue... am investigating more. Are you using IE on the PC?
  • edited 3:42AM
    Im using Firefox 3.6 on PC but also happens in Chrome 9 and Internet Explorer 8
  • edited 3:42AM
    OK... I think I've found the issue. It seems to be deep within the CI's Input class on line 83. That changed between the CI 2.0 beta to the Official release from:
    $str = str_replace(array("\r\n", "\r"), "\n", $str);
    TO
    $str = str_replace(array("\r\n", "\r"), EOL, $str);
    Changing the EOL back to the "\n" seemed to fixed that issue. I may do a MY_Input.php and extend that core to put in that fix, but will check the CI 2 bitbucket repo to see if this was reported elsewhere.
  • edited 3:42AM
    Here's the same bug reported:
    https://bitbucket.org/ellislab/codeigniter/issue/332/newlines-in-textareas-are-duplicated

    The person reporting it seemed to just set "_standardize_newlines" = FALSE in that class.

    Regardless, it sounds like I need to extend the core to put in this fix until CI 2 releases a patch.
  • edited 3:42AM
    Thanks really appreciate your efforts here again.
  • edited 3:42AM
    Thanks for the report... I've pushed the fix to the repo.
Sign In or Register to comment.