google-nomulus/java/google/registry/tools/soy/DomainApplicationInfo.soy
lukes 8a8276e838 ​​​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
2016-12-06 11:52:46 -05:00

43 lines
1.4 KiB
Text

// Copyright 2016 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
{namespace domain.registry.tools autoescape="strict"}
/**
* Domain application info request
*/
{template .domainapplicationinfo}
{@param domainName: string}
{@param id: string}
{@param phase: string}
{@param? subphase: string}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<info>
<domain:info
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>{$domainName}</domain:name>
</domain:info>
</info>
<extension>
<launch:info
xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
<launch:phase {if $subphase}name="{$subphase}"{/if}>{$phase}</launch:phase>
<launch:applicationID>{$id}</launch:applicationID>
</launch:info>
</extension>
<clTRID>RegistryTool</clTRID>
</command>
</epp>
{/template}