ColorlibHQ / shapely-companion

GNU General Public License v3.0
4 stars 7 forks source link

Paralax Section Content Editor inserts html #31

Open Sighter opened 6 years ago

Sighter commented 6 years ago

Hey,

I am using Shapely and do like it so far. Though there is bug for me.

The Paralax sections do have a editor for the content text. This editor has two tabs. One of them is a WYSIWYG-Editor and the other one is for inserting text and html code. I can insert text in both and on the first save everything is shown correctly. But when I leave the customizer for example, and navigate to the widget editor again, html was added to the content. Mostly linebreaks are added. Short said, the saved markup does not stay consistent over saves. Is there a possibility for me change this editor to an html editor somehow? ( I can write php and js) Or do you have other ideas?

I am using shapely 1.2.2 and the companion plugin is installed with version 1.2.3

Greets Sascha

Sighter commented 5 years ago

I think i found the problem. It is actually in the companion plugin. See here: https://github.com/ColorlibHQ/shapely-companion/blob/8fa531db53717232cd280e7251d61447c85820b3/inc/widgets/class-shapely-home-parallax.php#L188

The nl2br function is used there, which if called repeatly, adds html
tags and keeps the new line.

Removing the call does it for me.

Cheers

pulketo commented 5 years ago

This has not been fixed yet... :(