← All changes
|
modules/atomic-widgets/elements/atomic-button/atomic-button.html.twig
+10
-12
4.0.9
→
3.29.0-beta4
View file →
| @@ -1,19 +1,17 @@ | ||
| 1 | 1 | {% if settings.text is not empty %} |
| 2 | - {%- set allowed_tags = '<b><strong><sup><sub><s><em><i><u><del><span><br>' %} | |
| 3 | 2 | {% set classes = settings.classes | merge( [ base_styles.base ] ) | join(' ') %} |
| 4 | - {% set id_attribute = settings._cssid is not empty ? 'id=' ~ settings._cssid | e('html_attr') : '' %} | |
| 5 | - {% if settings.link and settings.link.attributes is not empty %} | |
| 6 | - <{{ settings.link.tag | e('html_tag') }} | |
| 7 | - {{ settings.link.attributes | raw }} | |
| 8 | - class="{{ classes }}" | |
| 9 | - data-interaction-id="{{ interaction_id }}" | |
| 10 | - {{ id_attribute }} {{ settings.attributes | raw }} | |
| 3 | + | |
| 4 | + {% if settings.link.href %} | |
| 5 | + <a | |
| 6 | + href="{{ settings.link.href | e('full_url') }}" | |
| 7 | + target="{{ settings.link.target }}" | |
| 8 | + class="{{ classes }}" | |
| 11 | 9 | > |
| 12 | - {{ settings.text | striptags(allowed_tags) | raw }} | |
| 13 | - </{{ settings.link.tag | e('html_tag') }}> | |
| 10 | + {{ settings.text }} | |
| 11 | + </a> | |
| 14 | 12 | {% else %} |
| 15 | - <button class="{{ classes }}" data-interaction-id="{{ interaction_id }}" {{ id_attribute }} {{ settings.attributes | raw }}> | |
| 16 | - {{ settings.text | striptags(allowed_tags) | raw }} | |
| 13 | + <button class="{{ classes }}"> | |
| 14 | + {{ settings.text }} | |
| 17 | 15 | </button> |
| 18 | 16 | {% endif %} |
| 19 | 17 | {% endif %} |