e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
321 stars 213 forks source link

What's the point of converting all img tags to bbcode? #4263

Open Serios opened 3 years ago

Serios commented 3 years ago

I don't quite get it, really, what's the point of converting all img tags to bbcode in textareas? Allowing image tags and their 'src' values to remain dynamic?!?! They where dynamic ! Filtering HTML inputs is a good practice to a certain point!

Whats more frustrating is that extra classes like 'img-rounded rounded bbcode bbcode-img' are added to images and there is no way (that I know of) to prevent it. Yes i know I can override them in css or modify core files to stop it from happening, but what's the point of adding extra code just to fix something, that shouldn't happening at the first place and modifying core is a big NO NO.

Yes I know, that there are users who don't care/don't have the knowledge and want the things to just work out of the box, that's fine, but there are also "power" users who really know what are doing and want to shape things in their own way, thus making their life miserable is not good.

I really liked the flexibility of e107, if you are ordinary user it will work for you, if you know what your doing you can do wonderful things, it was working both ways, in my opinion that's the way things should work. Recently it become more and more frustrating to manage things.

I think it should be optional to filter HTML or at least leave at the user to decide what should be filtered

CaMer0n commented 3 years ago

@Serios Thank you for your post.

Could you please comment below with the img tags you're manually adding and also the filtered output img tag you are seeing after saving?

Serios commented 3 years ago

Hi @CaMer0n this happens when add/edit WM and News, Tinymce is installed and activated. I'm adding standard img tags <img ... /> after save, they get converted to [img] .... [/img] I think the problem comes from the parser in e107/e107_plugins/tinymce4/plugins/e107, the thing is that even if no class is provided the bb img tag still adds 'img-rounded rounded bbcode bbcode-img ...' to the image class

CaMer0n commented 3 years ago

Thanks @Serios You're correct. I'll see if I can add an override option for this, so you (and more advanced users like yourself) can disable that class default.