![]() |
textarea duplicates line breaks - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: textarea duplicates line breaks (/showthread.php?tid=38254) Pages:
1
2
|
textarea duplicates line breaks - El Forum - 04-07-2011 [eluser]InsiteFX[/eluser] CodeIgniter User Guide - Typography Helper Not sure if this will solve your problems but give it a try. Code: nl2br_except_pre() Usage example: Code: $string = nl2br_except_pre($string); InsiteFX textarea duplicates line breaks - El Forum - 04-10-2011 [eluser]Freeze Dried Pop[/eluser] [quote author="mikkelz" date="1302174534"]I take it that updating the Input class in /system/core is a better option than creating a custom input class to override that bit of code? Or what is the recommended method for resolving these bugs until a new version is released? Edit: I kind of answered my own question by going ahead and modifying the Input class with the latest change on bitbucket. Line #542: Code: $str = str_replace(array("\r\n", "\r", "\r\n\n"), PHP_EOL, $str); It feels "cleaner" than hacking in a custom class for something small like this. Edit 2: Thanks for the link JuanitoDelCielo[/quote] Cheers, i've implemented this and it's fixed now. Was racking my brains for a good hour before realising it might be something to do with Code Igniter. That's the last time I douby my knowledge of simple HTML. |