escape.d.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * Copyright (C) 2016-2018 Michael Kourlas
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /**
  17. * Replaces ampersands (&) with the appropriate XML character reference.
  18. */
  19. export declare function escapeAmpersands(str: string): string;
  20. /**
  21. * Replaces left angle brackets (<) with the appropriate XML character
  22. * reference.
  23. */
  24. export declare function escapeLeftAngleBrackets(str: string): string;
  25. /**
  26. * Replaces right angle brackets (>) with the appropriate XML character
  27. * reference when part of the string "]]>".
  28. */
  29. export declare function escapeRightAngleBracketsInCdataTerminator(str: string): string;
  30. /**
  31. * Replaces single quotes (") with the appropriate XML character reference.
  32. */
  33. export declare function escapeSingleQuotes(str: string): string;
  34. /**
  35. * Replaces double quotes (") with the appropriate XML character reference.
  36. */
  37. export declare function escapeDoubleQuotes(str: string): string;