Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>TL;DR <strong>Both terms are interchangeable</strong> (if what you mean is to convert some characters so they will be interpreted as plain string data). This debate is old. From <a href="http://cwe.mitre.org/data/definitions/116.html" rel="nofollow">CWE-116: Improper Encoding or Escaping of Output</a>: </p> <blockquote> <p>The usage of the "encoding" and "escaping" terms varies widely. For example, in some programming languages, the terms are used interchangeably, while other languages provide APIs that use both terms for different tasks. This overlapping usage extends to the Web, such as the "escape" JavaScript function whose purpose is stated to be encoding. Of course, the concepts of encoding and escaping predate the Web by decades. Given such a context, it is difficult for CWE to adopt a consistent vocabulary that will not be misinterpreted by some constituency.</p> </blockquote> <p>Comically enough JavaScript also has <code>encodeURIComponent()</code>, and its <a href="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf" rel="nofollow">specification</a> avoids the debate entirely:</p> <blockquote> <p>The encodeURIComponent function <strong>computes a new version</strong> of a URI in which each instance of certain characters is replaced by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.</p> </blockquote> <p>Personally I believe it's more appropriate to refer to the general process as "encoding", as you're creating a <a href="http://en.wikipedia.org/wiki/Code" rel="nofollow">code</a> to be transmitted through a communications channel (a piece of markup/programming code) and interpreted by a receiver (the parser). I think it's silly to replace <code>&lt;</code> with something completely different like <code>&amp;#60;</code> and call that "escaping".</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload