Skip to content

preserveLineBreaks with cleanupInput #219

Open
@yveskilchenmann

Description

@yveskilchenmann

when the option "cleanupInput" is set to "false", then the option "preserveLineBreaks" gets ignored.

i fixed this by just copying out the lines:

                $replace = ' ';
                if ($this->options->get('preserveLineBreaks')) {
                    $replace = '
';
                }
                $str = str_replace(["\r\n", "\r", "\n"], $replace, $str);
                if ($str === false) {
                    throw new LogicalException('str_replace returned false instead of a string. Error when attempting to clean input string.');
                }

and put them at the start of the clean function, just before cleanupInput got checked

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions