You are here

function _quotes_escape_newlines in Quotes 6

Same name and namespace in other branches
  1. 5 quotes.module \_quotes_escape_newlines()
  2. 7 quotes.admin.inc \_quotes_escape_newlines()

Helper function to strip Windows newline and format Unix newlines.

Parameters

$text: The text to be scanned. @return Text with newlines processed.

1 call to _quotes_escape_newlines()
quotes_export in ./quotes.admin.inc
Export function page.

File

./quotes.admin.inc, line 256
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);
}