function _quotes_escape_newlines in Quotes 7
Same name and namespace in other branches
- 5 quotes.module \_quotes_escape_newlines()
- 6 quotes.admin.inc \_quotes_escape_newlines()
Helper function to strip Windows newline and format Unix newlines.
Parameters
string $text: The text to be scanned.
Return value
string Text with newlines processed.
1 call to _quotes_escape_newlines()
- quotes_export in ./
quotes.admin.inc - Export function page.
File
- ./
quotes.admin.inc, line 280 - The quotes module allows users to maintain a list of quotes that can be displayed in any number of administrator-defined quote blocks.
Code
function _quotes_escape_newlines($text) {
// Get rid of Windows crap.
$text = str_replace("\r", '', $text);
return str_replace("\n", "\\\n", $text);
}