janeway icon indicating copy to clipboard operation
janeway copied to clipboard

Auto-remove erroneous formatting for abstracts in metadata

Open rhb123 opened this issue 4 years ago • 7 comments

Describe the bug At present, even when using plain text editors to paste metadata into the abstract field, this leaves a lot of invisible code junk which messes up the formatting, meaning that it needs to be fixed by going into the code manually. This is particularly time consuming across an issue, at which this needs to be fixed individually for several articles.

Expected behavior An auto-formatter would be good that strips out all surplus / weird formatting would be great as it would save a lot of time doing these individually.

Thanks for your help

rhb123 avatar Mar 26 '20 12:03 rhb123

Clean paste available in new version of Django Summernote.

ajrbyers avatar Dec 14 '20 16:12 ajrbyers

Provisionally added to 1.4.3 as a reminder to take care of the Summernote formatting issues that are a persistent frustration for many users

joemull avatar May 24 '22 08:05 joemull

Another option for this one: Bleach Field. It can be used with summernote.

ajrbyers avatar May 24 '22 09:05 ajrbyers

Sadly, this issue will need to wait until 1.5 as bleach, which I think is the best solution for this, doesn't work on django 1.11.

ajrbyers avatar Jun 10 '22 13:06 ajrbyers

It will be important to retain italicization by default so that titles of works retain italics.

joemull avatar Jul 15 '22 10:07 joemull

It will be important to retain italicization by default so that titles of works retain italics.

Using bleach will allow us to flexibly determine which elements are and which aren't allowed. They can bet set at the global level and then tweaked for individual fields that require different elements.

ajrbyers avatar Jul 15 '22 10:07 ajrbyers

Reopened due to some useability issues with django-bleach #2282 backend-only implementation.

mauromsl avatar Feb 19 '24 16:02 mauromsl

closed by #3983

mauromsl avatar Mar 12 '24 16:03 mauromsl