-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn Site Owners about Raw HTML #343
Comments
@CreationCassel Thanks for the report! I was unable to reproduce this in a clean installation though. When I've seen this sort of thing in the past, it was almost always caused by a plugin/theme conflict related to shortcode parsing. When I visit your site I find several |
It might sound odd but i cannot see the br tags. Cassel From: JasWSInc @CreationCassel Thanks for the report! I was unable to reproduce this in a clean installation though. When I've seen this sort of thing in the past, it was almost always caused by a plugin/theme conflict related to shortcode parsing. When I visit your site I find several — |
I see. Thanks. I wonder if WP4.0 did that. I noticed it did mess up the behavior of some php code on other pages, maybe it affected that one too. Thanks for identifying those, so i’ll see if i can even just replace the code for the paypal button by a fresh version. Hopefully it will work. If i find a more specific cause or solution, i’ll let you know in case it can happen to others. Cassel From: JasWSInc I don't think it's something that you can just remove, these are generally caused (i.e. injected inadvertently) by a misbehaving plugin/theme that conflicts with WP shortcodes. I found the — |
Hi, I found a partial “solution” and it looks like it might be a WP thing that is affecting s2M button output. Here is the steps i took to test, based on someone’s wild suggestion: 1- I recreated the button and copied/pasted a fresh php version in WP (through the text mode). It still had that space. 2- I used the same button code, and remove all the line changes, not line breaks, but all the “formatting” that was made with the code when i copied it, so it looked something like this (this is only a part of it): Interestingly, this would take care of the extra space (but much harder to read, for sure). 3- i used the same code, with line changes and nice looking format, and used it in a html leaf for Headway Theme, and the space does not appear. So i am suspecting that WP4.0 is adding those break tags to the php code generated by s2M. Carole From: JasWSInc I don't think it's something that you can just remove, these are generally caused (i.e. injected inadvertently) by a misbehaving plugin/theme that conflicts with WP shortcodes. I found the — |
@jaswsinc In my test installation I tried the HTML for the button as gotten from generator, pasted it in the Text editor of a page, saved and there are a lot of empty lines before the button. |
That's to be expected. Any raw HTML that you input into a default WordPress installation (no matter which tab you are working from in the editor) is subject to the content filters applied by WordPress. I suggest using the shortcodes provided by s2Member to avoid this problem. Or, if you must use raw HTML, please use it in conjunction with a plugin like raw HTML. https://wordpress.org/plugins/raw-html/ @CreationCassel If you are using an s2Member shortcode and still getting blank lines (i.e. I tested s2Member's shortcodes in WP v4.0 and the only issue that I'm finding is related to a bug with the |
Oh, I see, the Text editor still converts newlines to line-breaks, I thought that it was a plain text editor only and missed that part. Sorry about changing the label then. Yeah, I guess wrapping with a raw shortcode would take care of it. Thanks! |
Shortcode is NOT a problem. However, I just find it odd that it only appeared now that i have updated WP (unless it was the last s2M update??) and now, i would need a plugin to be able to use the code (that worked fine before) provided by your plugin. Carole From: JasWSInc In my test installation I tried the HTML for the button as gotten from generator, pasted it in the Text editor of a page, saved and there are a lot of empty lines before the button. That's to be expected. Any raw HTML that you input into a default WordPress installation (no matter which tab you are working from in the editor) is subject to the content filters applied by WordPress. I suggest using the shortcodes provided by s2Member to avoid this problem. Or, if you must use raw HTML, please use it in conjunction with a plugin like raw HTML. https://wordpress.org/plugins/raw-html/ @CreationCassel If you are using an s2Member shortcode and still getting blank lines (i.e. I tested s2Member's shortcodes in WP v4.0 and the only issue that I'm finding is related to a bug with the wptexturize filter, as detailed here. That's not related to the — |
It's fine, just try wrapping it inside the [raw] tag to avoid the |
It might be important to notify the users though, or they will think s2M is faulty. From: Cristián Lávaque i need the php version to insert a particular hack, which cannot be placed inside a shortcode It's fine, just try wrapping it inside the [raw] tag to avoid the — |
Thanks. I agree it'd be good to add a note about it next to the field in the generator, just as the PHP execution plugin requirement is mentioned. @jaswsinc |
Agreed, we can add a note here to warn site owners about using raw HTML code in WP. I think we had a warning there awhile back, but it was removed at some point; now only a note about the PHP code exists there. It's never been possible to insert raw HTML into any version of WordPress without having unexpected behavior. |
Maybe the footnote could read: "Using this will require a Raw HTML plugin and a PHP Execution plugin." |
@clavaque I agree, that's perfect! Can you work on this? |
I guess i must have been lucky because i always used it AS IS without any issue. shrug Carole From: JasWSInc Agreed, we can add a note here to warn site owners about using raw HTML code in WP. I think we had a warning there awhile back, but it was removed at some point; now only a note about the PHP code exists there. It's never been possible to insert raw HTML into any version of WordPress without having unexpected behavior. — |
And may i suggest a link to that plugin? From: Cristián Lávaque Maybe the footnote could read: "Using this will require a Raw HTML plugin and a PHP Execution plugin." — |
PayPal Buttons causing space above button due to RAW HTML in Text Widget Areas. WordPress Version: 4.8 Current workaround is to install: https://wordpress.org/plugins/raw-html/ and disable automatic formatting. |
Update - unchecking the "automatically add paragraphs" can fix the spacing issue. |
I am not sure when it did happen, but i didn't edit a specific page in a long time. I am using the PHP code for a Paypal button. I need the php version instead of the shortcode because of a hack used in it.
This worked fine for many months but today, as i was looking at the page to do some edits, i noticed that the php code "displays" as extra white lines, and that means a LOT of lines.
Here is the page in question: http://scrapbookcampus.com/register-creative-scrap-course-2
Notice that each green button is preceded by a many white lines, but there is no way to remove them without removing the php code.
I do not know if it was some of the updates that caused that, or a WP upgrade, but i know it was not like that before. I just don't know how long ago it happened since that is not a page i look at or edit often at all.
Cassel
The text was updated successfully, but these errors were encountered: