​​​Remove html ambiguity from soy templates.

Soy is gaining support for parsing/validating html structure and as such a number of patterns will start getting rejected by the parser.  This change fixes newly errant soy templates by:

* transforming '<' characters that are not part of html tags to '&lt;'
* inserting whitespace following tag names so that they are unambiguous
* changing templates not rendering html to kind="text" so html rules don't apply
* fixing control flow such that all tags (and quoted attribute values) are completely defined within a single control flow block.  In some cases this required extracting {let..} vars or whole templates and in others it required duplicating conditions.
* removing stray unmatched quote characters in html tags.
* fixing incorrectly written html comments

LSC: https://docs.google.com/document/d/18MLrX8kUVzYGe1dBaSfh1kcQ_1UB02QHOk4KZtvHkIc/edit#

Tested:
    $ blaze test //third_party/java_src/gtld/java/google/registry/flows:all //third_party/java_src/gtld/java/google/registry/tools/soy:all

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140475284
This commit is contained in:
lukes 2016-11-29 07:13:27 -08:00 committed by Ben McIlwain
parent 2b7d580bb3
commit 8a8276e838

View file

@ -33,7 +33,7 @@
<extension> <extension>
<launch:info <launch:info
xmlns:launch="urn:ietf:params:xml:ns:launch-1.0"> xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
<launch:phase{if $subphase} name="{$subphase}"{/if}>{$phase}</launch:phase> <launch:phase {if $subphase}name="{$subphase}"{/if}>{$phase}</launch:phase>
<launch:applicationID>{$id}</launch:applicationID> <launch:applicationID>{$id}</launch:applicationID>
</launch:info> </launch:info>
</extension> </extension>