diff --git a/theme/templates/macros/common.html b/theme/templates/macros/common.html index 5df47008863e3d8707506eeceada33b07bf1f602..63d9c7e73dd8e55c6be0df9ebfbfc34cb53269d6 100644 --- a/theme/templates/macros/common.html +++ b/theme/templates/macros/common.html @@ -3,13 +3,23 @@ {#- ############################# SPAN #################################### -#} {%- macro encoded_span(content) -%} - {%- set contentsplit = content.split('­')-%} <span> - {%- for s in contentsplit -%} + {%- set shysplit = content.split('­')-%} + {%- for curshy in shysplit -%} {%- if not loop.first -%} ­ {%- endif -%} - {{ s|e }} + + {%- set nbspsplit = curshy.split(' ')-%} + {%- for curnbsp in nbspsplit -%} + {%- if not loop.first -%} + + {%- endif -%} + + {{ curnbsp|e }} + {%- endfor -%} + + {%- endfor -%} </span> {%- endmacro -%}