Ticket #646 (new defect)
String.clean
| Reported by: | JanK | Owned by: | kamicane |
|---|---|---|---|
| Type: | defect | Priority: | minor |
| Milestone: | Mootools version 1.3 | Component: | Core |
| Keywords: | Cc: |
Description
String.clean replaces tabs and newlines with a space, but only if theres more than one consecutive whitespace, better would be to replace all whitespace by one space.
"foo\t\tbar".clean(); // "foo bar" "foo\tbar".clean(); // "foo\tbar"
The regexp /\s+/g could replace the current regexp.
Change History
Note: See
TracTickets for help on using
tickets.