N
N
Nikita Belov2019-07-16 16:25:12
Twig
Nikita Belov, 2019-07-16 16:25:12

Why doesn't TWIG output Cyrillic correctly?

Twig basically goes crazy when I write some Russian text in templates, I can't understand why, a year ago everything worked like clockwork

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    {% block head %}
        <title>{% block title %}{% endblock %} - тест TEST</title>
    {% endblock %}
</head>
<body>
    <div id="content">
        {% block content %}
        {% endblock %}
    </div>
    <div id="footer">
        {% block footer %}
            <div><a href=""><span>тест</span></a></div>
        {% endblock %}
    </div>
</body>
</html>

{% extends "admin-index.twig" %}

Файл content.twig
{% block title %}Index{% endblock %}
{% block head %}
    {{ parent() }}
    <style type="text/css">
        .important { color: #336699; }
    </style>
{% endblock %}
{% block content %}
    <h1>Index</h1>
    <p class="important">
        Welcome on my awesome homepage.
    </p>
{% endblock %}

{% block footer %}
    {{ parent() }}
    <h1>TECT </h1>
{% endblock %}

here's what happens to it:5d2dd0b7776ce655008774.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Belov, 2019-07-17
@NikitaRain

UPD: Demolished twig, rolled blade. And I feel great, I advise.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question