You are here

function ProcessEscapes in Typogrify 5

Same name and namespace in other branches
  1. 6 smartypants.php \ProcessEscapes()
  2. 7 smartypants.php \ProcessEscapes()
5 calls to ProcessEscapes()
convert_characters in ./unicode-conversion.php
SmartDashes in ./smartypants.php
SmartEllipses in ./smartypants.php
SmartQuotes in ./smartypants.php
SmartyPants in ./smartypants.php

File

./smartypants.php, line 618

Code

function ProcessEscapes($_) {

  #

  #   Parameter:  String.

  #   Returns:    The string, with after processing the following backslash

  #               escape sequences. This is useful if you want to force a "dumb"

  #               quote or other character to appear.

  #

  #               Escape  Value

  #               ------  -----

  #               \\      \

  #               \"      "

  #               \'      '

  #               \.      .

  #               \-      -

  #               \`      `

  #
  $_ = str_replace(array(
    '\\\\',
    '\\"',
    "\\'",
    '\\.',
    '\\-',
    '\\`',
  ), array(
    '\',
    '"',
    ''',
    '.',
    '-',
    '`',
  ), $_);
  return $_;
}