Mark down adding white space

edited February 2011 in Bug Reports

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.


  • 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 12:15PM
    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 12:15PM
    Im using Firefox 3.6 on PC but also happens in Chrome 9 and Internet Explorer 8
  • edited 12:15PM
    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);
    $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 12:15PM
    Here's the same bug reported:

    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 12:15PM
    Thanks really appreciate your efforts here again.
  • edited 12:15PM
    Thanks for the report... I've pushed the fix to the repo.
Sign In or Register to comment.