Symfony导入的YAML文件丢失了一点扼杀指标

时间:2017-11-20 19:10:40

标签: symfony twig yaml grav

我使用Grav CMS的插件与symfony / twig一起导入yaml文件,其中包含以下内容:

sp:
  xyzsp:
    description: ''
    issuer: https://ssotest.com
    relay_state: "/"
    login_url: https://ssotest.com
    logout_url: https://ssotest.com/access/logout
    slo_url: ''
    metadata: >-
      <?xml version="1.0" encoding="UTF-8" standalone="yes"?><EntityDescriptor entityID="your_subdomain.com" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"><SPSSODescriptor AuthnRequestsSigned="false" WantAssertionsSigned="true" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"><NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</NameIDFormat><AssertionConsumerService index="1" Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://accountname.com/access/saml"/></SPSSODescriptor></EntityDescriptor>
    sign_response: false
    sign_assertion: true
    encrypt_assertion: false
    profile:
      assertion: global
      nameid: global
      attribute: empty
      response: global
      signature: global

我正在创建一个数组,然后使用yaml_emit导入完整的YAML文件:

{% autoescape 'html' %}
{{ arr2|yaml_emit}}
{% endautoescape %}

这在很大程度上起作用。但是,在网页上,导入的文件在没有“元数据”字段的>-块选择指示符的情况下呈现,因此呈现为:

sp:
  xyzsp:
    description: ''
    issuer: https://ssotest.com
    relay_state: /
    login_url: https://ssotest.com
    logout_url: https://ssotest.com/access/logout
    slo_url: ''
    metadata: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><EntityDescriptor entityID="your_subdomain.com" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"><SPSSODescriptor AuthnRequestsSigned="false" WantAssertionsSigned="true" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"><NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</NameIDFormat><AssertionConsumerService index="1" Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://accountname.com/access/saml"/></SPSSODescriptor></EntityDescriptor>
    sign_response: false
    sign_assertion: true
    encrypt_assertion: false
    profile:
      assertion: global
      nameid: global
      attribute: empty
      response: global
      signature: global

如何确保不删除块阻塞指示器?

0 个答案:

没有答案