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
320 stars 213 forks source link

problem with parsing bbcode text in forum topic #4093

Open Jimmi08 opened 4 years ago

Jimmi08 commented 4 years ago

Bug Description

I wrote this to demonstrate weird behavior in the forum post to manipulate (parsing) text , because this problem is not new. There is (was) issue with inserting video code or images (creating messed it up and editing was correct).

How to Reproduce

Steps to reproduce the behavior:

  1. Try to post new topic with bbcodes
  2. Use any HTML emoji f.e. 🗹
  3. if you use preview - everything looks correct, emoji are displayed correctly
  4. Save it - emoji are replaced with ???
  5. Edit it - replace ??? with emoji code - result is correct
  6. Edit it again and add new emoji - new emoji are correct but old ones are replaced with ???

Expected Behavior

Screenshots

After creating (Preview was correct) image

After editing image

After resaving emojis are messed again.

Thanks

CaMer0n commented 4 years ago

@Jimmi08 I believe this could be related to the fact you're using HTML, in a bbcodes (designed to replace html) post. Do you have HTML posting enabled for the person posting?

Jimmi08 commented 4 years ago

Not sure if this settings apply for main admin (because it's listed as next option I can see now):

image

What I need is to be able to use HTML but without TinyMCE. Tinymce is too strict, it does things out of control, it's not possible to use on forum frontend post. But I never noticed that I can't use HTML with BBCodes. But I am sure that there are a lot of problems if you switch from BBCodes to TinyMCE.

I thought that [html][/html] tags are for using html inside bbcodes.

Now I am totally confused about this.

Jimmi08 commented 4 years ago

@CaMer0n I just remember - this issue wasn't about HTML code, but that there are different rules for parsing forum post content in preview, create and edit mode. This is the problem.