TheRestartProject / Fixometer

ARCHIVED - new repo is https://github.com/therestartproject/restarters.net.
https://therestartproject.org/fixometer
GNU General Public License v3.0
10 stars 1 forks source link

Formatting issues when copy pasting into Description for events #146

Open ngm opened 7 years ago

ngm commented 7 years ago

Sometimes users copy paste existing info into the Description field from an existing website.

This can results in bad formatting on the front-end.

e.g. https://therestartproject.org/parties/aylesbury-hp21-7rt/

Ideas

ngm commented 7 years ago

Works but doesn't seem to strip out font size...

steps to reproduce

image

image

Is there a summernote setting to also remove font-size when pasting in?

IronRunes commented 6 years ago

myself to pull updates to summernote & cleaner

IronRunes commented 6 years ago

I tried copy/pasting from a word document. It works perfectly. My assumption is that it preserves well formed HTML, for some reason, but it also kind of makes sense.

ngm commented 6 years ago

Not necessarily related to this, but appears there's a bug in summernote-cleaner such that it doesn't correctly strip the style tag if there is an apostrophe in the styling.

e.g.

image.png

becomes

image.png

(screenshotted the HTML as otherwise github strips it out of my comment...)

ngm commented 6 years ago

Anyway let's roll with this for now, I changed the options such that it should be keeping a few basic tags, but still stripping out all styling. I'll report that bug to summernote-cleaner and we'll keep our eye on this over time, just in case we need to tweak settings any further.

ugomatic commented 6 years ago

This is still not working as it should. Two problems: 1) Spacing no longer works - I'm quite sure it used to. Even when there's a break in the code, it's ignored in the way the page is displayed. See this as an example, although it applies to all current events: https://therestartproject.org/parties/leicester-restart-party/ 2) Incorrect font/size are not stripped when doing copy & paste, as this screenshot shows [the font in this event has now been fixed, the spacing can't be fixed] screen shot 2018-04-13 at 14 46 25