Merge pull request #79 from TouchInstinct/feature/add_ascape_func

Add escape filter for descriptions
This commit is contained in:
Elena Bobkova 2019-07-01 16:24:42 +03:00 committed by GitHub
commit cf16591a42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 52 additions and 52 deletions

View File

@ -110,7 +110,7 @@
<div class="page-data section-helper">
<h2 class="subtitle" id="{{ methodGroup.sectionTitle }}">{{ methodGroup.title }}</h2>
{% if methodGroup.description is not null %}
<p>{{ methodGroup.description }}</p>
<p>{{ methodGroup.description | escape }}</p>
{% endif %}
{% if methodGroup.baseUrl is not empty %}
<p>BaseUrl: {{ methodGroup.baseUrl }}</p>

View File

@ -1,7 +1,7 @@
<h2 class="subtitle" id="{{ structure.type.baseTypeName }}">{{ structure.type.baseTypeName }}</h2>
<h3>Описание</h3>
<p class="sub-header">{{ structure.description }}</p>
<p class="sub-header">{{ structure.description | escape }}</p>
<h3>Структура данных</h3>
<div class="table">

View File

@ -1,7 +1,7 @@
<h2 class="subtitle" id="{{ structure.name }}">{{ structure.name }}</h2>
<h3>Описание</h3>
<p class="sub-header">{{ structure.description }}</p>
<p class="sub-header">{{ structure.description | escape }}</p>
<h3>Возможные значения</h3>
<div class="table table--small">
@ -13,7 +13,7 @@
{% for value in structure.values %}
<div class="row-body">
<div>{{ value.value }}</div>
<div>{{ value.description }}</div>
<div>{{ value.description | escape }}</div>
</div>
{% endfor %}
</div>

View File

@ -46,6 +46,6 @@
&nbsp;({{ field.type.dateFormat }})
{%- endif -%}
</div>
<div>{{ field.description }}</div>
<div>{{ field.description | escape }}</div>
<div>{{ utils.optionalDescription(field.optional) }}</div>
</div>

View File

@ -1,4 +1,4 @@
<h2 class="subtitle" id="{{ method.anchorPath }}">{{ method.description }}</h2>
<h2 class="subtitle" id="{{ method.anchorPath }}">{{ method.description | escape }}</h2>
<h3>Метод</h3>
<p class="sub-header">{{ method.type }} {{ method.url }}</p>
@ -120,7 +120,7 @@
{% else %}
{% for value in method.errorsEnumeration.values -%}
{%- if value.value in method.errorsEnumeration.allowedValues %}
<p class="sub-header">#Код {{ value.value }}{{ value.description }}</p>
<p class="sub-header">#Код {{ value.value }}{{ value.description | escape }}</p>
{%- endif -%}
{%- endfor %}
{% endif %}
@ -130,7 +130,7 @@
<p class="sub-header">Результат отсутствует</p>
{% else %}
{% if method.booleanResponseDescription is not empty %}
<p>{{ method.booleanResponseDescription }}. Тип Boolean.</p>
<p>{{ method.booleanResponseDescription | escape }}. Тип Boolean.</p>
{% elseif method.responseFields is not empty %}
<p>Объект следующей структуры:</p>

View File

@ -19,7 +19,7 @@
{
"result": <span class="text-digit">null</span>
"error_code": <span class="text-digit">{{ outOfDateError.value }}</span>,
"error_message": <span class="text-digit">"{{ outOfDateError.description }}"</span>
"error_message": <span class="text-digit">"{{ outOfDateError.description | escape }}"</span>
}
</div>
</div>

View File

@ -1,44 +1,44 @@
{%- include 'blocks/head.html.twig' with { title: pageTitle, cssFolderPath: cssFolderPath } %}
<body class="main-page">
<div class="aside aside-left">
<div class="aside__container">
<div class="header">
{%- include 'blocks/menu-header.html.twig' %}
</div>
<div class="content">
{%- include 'blocks/main-menu.html.twig' with { mainMenu: mainMenu } %}
</div>
</div>
</div>
<div class="aside aside-right">
{%- include 'blocks/header.html.twig' with {
imagesFolderPath: imagesFolderPath,
methodsPath: methodsPath,
relativeToRootPath: relativeToRootPath
} %}
<div class="content">
<div class="page-data">
<div class="table">
<div class="part-table">
<div class="row-header">
<div>Код ошибки</div>
<div>Текстовое описание ошибки</div>
</div>
{% for errorValue in errorType.values %}
<div class="row-body">
<div>{{ errorValue.value }}</div>
<div>{{ errorValue.description }}</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{%- include 'blocks/scripts.html.twig' with { jsFolderPath: jsFolderPath } %}
</body>
{%- include 'blocks/head.html.twig' with { title: pageTitle, cssFolderPath: cssFolderPath } %}
<body class="main-page">
<div class="aside aside-left">
<div class="aside__container">
<div class="header">
{%- include 'blocks/menu-header.html.twig' %}
</div>
<div class="content">
{%- include 'blocks/main-menu.html.twig' with { mainMenu: mainMenu } %}
</div>
</div>
</div>
<div class="aside aside-right">
{%- include 'blocks/header.html.twig' with {
imagesFolderPath: imagesFolderPath,
methodsPath: methodsPath,
relativeToRootPath: relativeToRootPath
} %}
<div class="content">
<div class="page-data">
<div class="table">
<div class="part-table">
<div class="row-header">
<div>Код ошибки</div>
<div>Текстовое описание ошибки</div>
</div>
{% for errorValue in errorType.values %}
<div class="row-body">
<div>{{ errorValue.value }}</div>
<div>{{ errorValue.description | escape }}</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{%- include 'blocks/scripts.html.twig' with { jsFolderPath: jsFolderPath } %}
</body>
</html>