This seems to be related to this WP bug https://core.trac.wordpress.org/ticket/40960
Even when I encapsulate the html code with the shortcode, I am getting & replaced by &.amp.; when I return again to edit (take out the "."s obviously)
I am using WordPress 4.8.1
Can you explain what you are doing, and what you want to see, but see instead?
1. You cannot parse raw HTML in WordPress, unless you wrap it in code tags
2. HTML will be disformed if not used in the Text Edit mode.
Hence, if I understand your issue right, it's expected, but please let me know the exact steps you take and what you want to see, so I can understand better.
Thank you!
Hi,
This is not an issue isolated to my experience. It is a report of what looks to me to be an incompatibility due to a bug in WordPress 4.8.1. that is, it is not currently possible to force widget content to be html even when using toolset [wpv-noautop]
Perhaps the issue reported to wordpress core in ticket 40960 will be fixed in next release.
I am marking this issue as resolved because it is just a notification for you.
Here is an example of the code I am using. As you can see, after I save the text widget and then return, the raw code is converted. In this case all &s are changed.
see attached screenshot to see how the code was changed after I saved and returned to widget editor.
My entered code was:
[wpv-noautop]
<div class="myBox"><a href="https://toolset.com/?aid=22628&;affiliate_key=JRz77NSpDkP0&dr=clients-newsletter" target="_blank" rel="noopener">
<iframe src="<em><u>lien caché</u></em>" width="520" height="293" frameborder="5px" allowfullscreen=""></iframe></a></div>
<a href="https://toolset.com/?aid=22628&affiliate_key=JRz77NSpDkP0&dr=clients-newsletter" target="_blank" rel="noopener">Do You Want to Learn More?</a>
[/wpv-noautop]
I understand it right, that this happens only on Widgets?
Either way, the autop ShortCode is NOT intended to do things on the backend.
It does things on the Front End if any.
Hence, in the Editor this shortcode will not do anything at all.
And that is as far I see the issue you experience, and that cannot be solved by wrapping the content in any ShortCode.
As far I see this, it is not a Toolset Bug.
I have resolved my issue by using the Enhanced Text Plugin. WordPress has not resolved the bug in 4.8.1 as they reported in https://core.trac.wordpress.org/ticket/40960
If the shortcode does nothing in the backend, it should not be shown in the widget text editor.
See lien caché
The only issue related to Toolset is that the raw shortcode button should be removed from the text widget if it does nothing.
Well, there is not a single ShortCode in WordPress that does something in the backend.
ShortCodes work in the FrontEnd.
So does that "Raw" ShortCode, our "No-Autop" Wrapper.
It is elaborated in detail here:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-noautop
It removes automatic paragraphing, in the Front End, as in the backend, no ShortCode really can do something.
You are missing the point: If it does not do anything, you should not put the shortcode in the text widget UI! Perhaps you can put in a change request with your developers to remove it in an upcoming release. The screencast link I provided shows where the toolset shortcode is accessed in the text widget UI (raw button).
You can close the ticket, because I am using a plugin as a work around to the specific issue I reported, which is support of raw code in a text widget when using WP 4.8.1. In prior versions of WP, I used another plugin that is now deprecated. I had thought I did not need a plugin because your shortcode was offered as solution to encapsulate raw code within the text widget.
The Raw ShortCode needs to be inserted in the backend, as any other ShortCode in the WordPress ecosystem.
Then, on the front end it does what it is programmed to do.
In the example of the Raw ShortCode, it will avoid the auto paragraphing of WordPress.
In the Front end, this effect will be seen as example as this:
- put this in a text editor:
Now, WordPress will usually try to autoparagraph this and make it appear with line breaks.
The raw shortcode avoids this.
We have also the opposite ShortCode.
Both are elaborated here:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-autop
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-noautop