Escape XHP content
commitd3ab762207d963df9ff073249f9e06659df3e3f3
authorVladimir Matveev <vladima@fb.com>
Sun, 4 Mar 2018 22:43:18 +0000 (4 14:43 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Sun, 4 Mar 2018 22:48:37 +0000 (4 14:48 -0800)
tree63c5335bc32e7204bcadfbdcc5935f9c7d9922cd
parentd6b0a4863c0a0f78b174a5ef5ca2fce0462d3109
Escape XHP content

Summary:
Text of XHP body and attributes should be processed to decode HTML entities however escape sequences in it are not handled.

Note: In existing code during lowering we conflate several cases that should be processed differently, i.e.
```
<a attr="\t &amp;"/>
```
and
```
<a attr={"\t &amp;"}>
```
is both turned into
```
Xml { attributes = String("\t") }
```
In order to deal with it correctly decoding of HTML entities is moved to lowering

Reviewed By: oulgen

Differential Revision: D7149685

fbshipit-source-id: 44274c0cc03e0c25b35b6322770d93162b417170
hphp/hack/src/hhbc/emit_expression.ml
hphp/hack/src/parser/full_fidelity_ast.ml
hphp/hack/src/parser/html_entities.ml [moved from hphp/hack/src/hhbc/html_entities.ml with 96% similarity]