Skip to content

Replace all new line characters in flash message #1925

Description

@qzminski

A colleague of mine just encountered a problem where the JS failed because not all new line characters were replaced. I think to fix this the following change has to be made:

if ($messages !== '') {
    $template->hasMessages = true;
-    $template->messages = str_replace(array("\n", "'"), array('', '\''), $messages);
+    $template->messages = str_replace(array("\n", "\r", "'"), array('', '', '\''), $messages);
}

https://github.com/isotope/core/blob/master/system/modules/isotope/library/Isotope/Frontend.php#L337

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions