Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary Non-Breaking Spaces #109

Open
mogoh opened this issue Jan 20, 2022 · 1 comment
Open

Unnecessary Non-Breaking Spaces #109

mogoh opened this issue Jan 20, 2022 · 1 comment

Comments

@mogoh
Copy link
Contributor

mogoh commented Jan 20, 2022

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.

fsbraun added a commit that referenced this issue Sep 13, 2022
@fsbraun
Copy link
Member

fsbraun commented Sep 13, 2022

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants