djangocms-picture icon indicating copy to clipboard operation
djangocms-picture copied to clipboard

Unnecessary Non-Breaking Spaces

Open mogoh opened this issue 3 years ago • 1 comments

pictures.html contains some none-breaking spaces (u00a0).

see

$ grep -nRI $'\u00a0'
djangocms_picture/templates/djangocms_picture/default/picture.html:6:    {{ instance.link_attributes_str }}>
djangocms_picture/templates/djangocms_picture/default/picture.html:25:            {{ instance.img_src }} {{ picture_size.size.0 }}w
djangocms_picture/templates/djangocms_picture/default/picture.html:31:            {{ picture_size.size.0 }}px
djangocms_picture/templates/djangocms_picture/default/picture.html:39:        <figcaption>{{ instance.caption_text }}</figcaption>
djangocms_picture/templates/djangocms_picture/default/picture.html:57:    {{ instance.height }}
djangocms_picture/templates/djangocms_picture/default/picture.html:58:    {{ instance.alignment }}
djangocms_picture/templates/djangocms_picture/default/picture.html:59:    {{ instance.caption_text }}
djangocms_picture/templates/djangocms_picture/default/picture.html:61:    {{ instance.attributes_str }}
djangocms_picture/templates/djangocms_picture/default/picture.html:63:    {{ instance.get_size }} or {{ picture_size }}
djangocms_picture/templates/djangocms_picture/default/picture.html:65:    {{ instance.link_url }}
djangocms_picture/templates/djangocms_picture/default/picture.html:66:    {{ instance.link_page }}
djangocms_picture/templates/djangocms_picture/default/picture.html:67:    {{ instance.link_target }}
djangocms_picture/templates/djangocms_picture/default/picture.html:68:    {{ instance.link_attributes_str }}
djangocms_picture/templates/djangocms_picture/default/picture.html:72:    {{ instance.use_automatic_scaling }}
djangocms_picture/templates/djangocms_picture/default/picture.html:73:    {{ instance.use_no_cropping }}
djangocms_picture/templates/djangocms_picture/default/picture.html:74:    {{ instance.use_crop }}
djangocms_picture/templates/djangocms_picture/default/picture.html:75:    {{ instance.use_upscale }}
djangocms_picture/templates/djangocms_picture/default/picture.html:76:    {{ instance.thumbnail_options }}

This is probably a mistake and should be easy to fix.

mogoh avatar Jan 20 '22 15:01 mogoh

These non-breaking spaces appear quite frequently in djangocms inside the double-curly brackets {{ and }}. They do not end up in the generated html. I guess it's the alt key that stays pressed after you type { on some European keyboards.

I'd suggest to remove them when changing the affected files. (Most IDE show the nsbp.)

fsbraun avatar Sep 13 '22 08:09 fsbraun