pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

Pods Template Editor converting HTML to entities #4955

Closed apcimino closed 6 years ago

apcimino commented 6 years ago

Issue Overview

Creating a new template, I enter in something like:

Hello World

After I update it, the display is: <h1>hello world</h1>

Expected Behavior

The expected behavior is that the HTML code is not converted.

Current Behavior

screen shot 2018-05-23 at 8 43 09 am

screen shot 2018-05-23 at 8 43 26 am

Steps to Reproduce (for bugs)

  1. Create a new template
  2. Enter in any HTML code
  3. Click update
  4. HTML has now been encoded.

Possible Solution

WordPress Environment

``` WordPress Version: 4.9.5 PHP Version: 5.6.31-4+wpengine10 MySQL Version: 5.6.39 Server Software: Apache Your User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Firefox/60.0 Session Save Path: /var/lib/php/sessions Session Save Path Exists: Yes Session Save Path Writeable: Yes Session Max Lifetime: 1440 Opcode Cache: Apc: No Memcached: No OPcache: No Redis: No Object Cache: APC: No APCu: No Memcache: No Memcached: Yes Redis: Yes WPDB Prefix: wp_exno2q50rf_ WP Multisite Mode: No WP Memory Limit: 1028M Pods Network-Wide Activated: No Pods Install Location: /nas/content/live/matchk12stg/wp-content/plugins/pods/ Pods Tableless Mode Activated: No Pods Light Mode Activated: No Currently Active Theme: Atomlab Child Currently Active Plugins: Activity Log: 2.4.1 BuddyPress: 3.0.0 Contact Form 7: 5.0.1 Gravity Forms: 2.3.2 Gravity Forms Chained Selects Add-On: 1.0.9 Gravity Forms Survey Add-On: 3.2.2 Gravity Forms User Registration Add-On: 3.9 Insight Core: 1.5.3.4 Pods - Custom Content Types and Fields: 2.7.3 Pods Gravity Forms Add-On: 1.3 Simple CSS: 1.1 Slider Revolution: 5.4.7.2 Undo Redo for WPBakery Page Builder: 1.2.5 Visual Composer Clipboard: 4.1.1 WPBakery Page Builder: 5.4.7 WP Smush: 2.7.8 WP Sync DB: 1.5 ```

Pods Package Export (helpful!)

{"meta":{"version":"2.7.3","build":1527079277},"pods":{"301":{"id":301,"name":"element","label":"Elements","description":"","type":"taxonomy","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Element","public":"1","show_ui":"1","hierarchical":"1","rewrite":"1","rewrite_with_front":"1","rewrite_hierarchical":"1","capability_type":"default","capability_type_custom":"element","query_var":"0","sort":"0","built_in_post_types_bp-email":"0","built_in_post_types_custom_css":"0","built_in_post_types_customize_changeset":"0","built_in_post_types_ic_footer":"0","built_in_post_types_ic_mega_menu":"0","built_in_post_types_mc4wp-form":"0","built_in_post_types_oembed_cache":"0","built_in_post_types_page":"0","built_in_post_types_portfolio":"0","built_in_post_types_post":"0","built_in_post_types_resource":"1","built_in_post_types_testimonial":"0","built_in_post_types_vc4_templates":"0","built_in_post_types_vc_grid_item":"0","built_in_post_types_wpcf7_contact_form":"0","built_in_post_types_attachment":"0","menu_location":"default","show_in_nav_menus":"1","show_tagcloud":"1","show_tagcloud_in_edit":"1","show_in_quick_edit":"1","show_admin_column":"0","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_archive":"append","rest_enable":"0","read_all":"0","write_all":"0"},"278":{"id":278,"name":"resource_audience","label":"Resource Audiences","description":"","type":"taxonomy","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Resource Audience","public":"1","show_ui":"1","hierarchical":"1","rewrite":"1","rewrite_with_front":"1","rewrite_hierarchical":"1","capability_type":"default","capability_type_custom":"resource_audience","query_var":"0","sort":"0","built_in_post_types_bp-email":"0","built_in_post_types_custom_css":"0","built_in_post_types_customize_changeset":"0","built_in_post_types_ic_footer":"0","built_in_post_types_ic_mega_menu":"0","built_in_post_types_mc4wp-form":"0","built_in_post_types_oembed_cache":"0","built_in_post_types_page":"0","built_in_post_types_portfolio":"0","built_in_post_types_post":"0","built_in_post_types_resource":"1","built_in_post_types_testimonial":"0","built_in_post_types_vc4_templates":"0","built_in_post_types_vc_grid_item":"0","built_in_post_types_wpcf7_contact_form":"0","built_in_post_types_attachment":"0","menu_location":"default","show_in_nav_menus":"1","show_tagcloud":"1","show_tagcloud_in_edit":"1","show_in_quick_edit":"1","show_admin_column":"0","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_archive":"append","rest_enable":"0","read_all":"0","write_all":"0"},"266":{"id":266,"name":"resource","label":"Resources","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":{"resource_type":{"id":285,"name":"resource_type","label":"Resource Type","description":"","help":"","class":"","type":"pick","weight":0,"pick_object":"custom-simple","pick_val":"","sister_id":"","pick_custom":"Article or Paper\nResearch\nSample Document, Artifact, or Template\nSelf-Assessment or Root Cause Survey Instrument\nVideo or Webinar\n","required":"1","pick_format_type":"single","pick_format_single":"radio","pick_format_multi":"checkbox","pick_allow_add_new":"1","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"url":{"id":276,"name":"url","label":"URL","description":"","help":"","class":"","type":"website","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"0","website_format":"normal","website_allow_port":"0","website_clickable":"0","website_new_window":"0","website_max_length":"255","website_html5":"0","website_placeholder":"http:\/\/example.com\/","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","website_repeatable":"0"},"file_upload":{"id":293,"name":"file_upload","label":"File Upload","description":"add PDF, Word, PPT, etc.","help":"","class":"","type":"file","weight":2,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"0","file_format_type":"single","file_uploader":"plupload","file_attachment_tab":"upload","file_edit_title":"1","file_show_edit_link":"0","file_linked":"0","file_limit":"0","file_restrict_filesize":"20MB","file_type":"any","file_field_template":"rows","file_add_button":"Add File","file_modal_title":"Attach a file","file_modal_add_button":"Add File","file_wp_gallery_output":"0","file_wp_gallery_link":"post","file_wp_gallery_columns":"1","file_wp_gallery_random_sort":"0","file_wp_gallery_size":"thumbnail","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","file_allowed_extensions":""},"organization_name":{"id":310,"name":"organization_name","label":"Organization Name","description":"","help":"","class":"","type":"text","weight":3,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"organization_street_address_1":{"id":311,"name":"organization_street_address_1","label":"Organization Street Address 1","description":"","help":"","class":"","type":"text","weight":4,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"organization_street_address_2":{"id":312,"name":"organization_street_address_2","label":"Organization Street Address 2","description":"","help":"","class":"","type":"text","weight":5,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"organization_city":{"id":313,"name":"organization_city","label":"Organization City","description":"","help":"","class":"","type":"text","weight":6,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"organization_state":{"id":314,"name":"organization_state","label":"Organization State","description":"","help":"","class":"","type":"pick","weight":7,"pick_object":"us_state","pick_val":"","sister_id":"","required":"0","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_allow_add_new":"1","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"organization_zipcode":{"id":315,"name":"organization_zipcode","label":"Organization Zipcode","description":"","help":"","class":"","type":"number","weight":8,"pick_object":"","pick_val":"","sister_id":"","required":"0","number_format_type":"number","number_format":"i18n","number_decimals":"0","number_format_soft":"0","number_step":"1","number_min":"0","number_max":"100","number_max_length":"12","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","number_repeatable":"0","number_placeholder":""},"organization_url":{"id":316,"name":"organization_url","label":"Organization URL","description":"","help":"","class":"","type":"website","weight":9,"pick_object":"","pick_val":"","sister_id":"","required":"0","website_format":"normal","website_allow_port":"0","website_clickable":"0","website_new_window":"0","website_max_length":"255","website_html5":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","website_repeatable":"0","website_placeholder":""},"contact_person_first_name":{"id":317,"name":"contact_person_first_name","label":"Contact Person First Name","description":"","help":"","class":"","type":"text","weight":10,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"contact_person_last_name":{"id":318,"name":"contact_person_last_name","label":"Contact Person Last Name","description":"","help":"","class":"","type":"text","weight":11,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"contact_person_title":{"id":319,"name":"contact_person_title","label":"Contact Person Title","description":"","help":"","class":"","type":"text","weight":12,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"contact_person_email_address":{"id":320,"name":"contact_person_email_address","label":"Contact Person Email Address","description":"","help":"","class":"","type":"email","weight":13,"pick_object":"","pick_val":"","sister_id":"","required":"0","email_max_length":"255","email_html5":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","email_repeatable":"0","email_placeholder":""},"contact_person_phone_number":{"id":321,"name":"contact_person_phone_number","label":"Contact Person Phone Number","description":"","help":"","class":"","type":"number","weight":14,"pick_object":"","pick_val":"","sister_id":"","required":"0","number_format_type":"number","number_format":"i18n","number_decimals":"0","number_format_soft":"0","number_step":"1","number_min":"0","number_max":"100","number_max_length":"12","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","number_repeatable":"0","number_placeholder":""}},"show_in_menu":"1","label_singular":"Resource","public":"1","show_ui":"1","supports_title":"1","supports_editor":"0","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"resource","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"1","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_bp-email-type":"0","built_in_taxonomies_bp_member_type":"0","built_in_taxonomies_category":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_portfolio_category":"0","built_in_taxonomies_portfolio_tags":"0","built_in_taxonomies_post_tag":"0","built_in_taxonomies_testimonial_category":"0","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"1","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0","built_in_taxonomies_resource_audience":"1","built_in_taxonomies_element":"1","pfat_single":"Resource View"}},"templates":{"Resource View":{"id":322,"name":"Resource View","code":"<h2>hello<\/h2>","type":"template","slug":"resource-view","options":{"_vc_post_settings":"a:1:{s:10:\"vc_grid_id\";a:0:{}}","_edit_lock":"1527078765:2","_edit_last":"2","slide_template":"default","admin_only":"","restrict_capability":"","capability_allowed":"","pod_reference":"a:1:{s:3:\"pod\";s:8:\"resource\";}"}},"test":{"id":323,"name":"test","code":"<h1>hello world<\/h1>","type":"template","slug":"test","options":{"_vc_post_settings":"a:1:{s:10:\"vc_grid_id\";a:0:{}}","_edit_lock":"1527079013:2","_edit_last":"2","pod_reference":"a:1:{s:3:\"pod\";s:0:\"\";}","slide_template":"default","admin_only":"","restrict_capability":"","capability_allowed":""}}}}

Workaround or Alternate Solution Until Bug is Addressed

Related Issues and/or PRs

quasel commented 6 years ago

Cant confirm the issue on my sites - please deactivate all other plugins and use one of the "default" Themes and check again! IF the error is gone reactivate the plugins one by one until to fin out which one is interfering with pods

jimtrue commented 6 years ago

@quasel That was the first thing I had them do when they brought this one up in Support on Slack. In addition to the enabling Visual Editor in their User Profile (which I seem to remember 'caused an issue like this).

apcimino commented 6 years ago

Thanks. I think you can close this. It seems to be more widespread than just pods. Other parts of the site are doing this as well.

On May 24, 2018, at 1:51 PM, Jim True notifications@github.com wrote:

@quasel https://github.com/quasel That was the first thing I had them do when they brought this one up in Support on Slack. In addition to the enabling Visual Editor in their User Profile (which I seem to remember 'caused an issue like this).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pods-framework/pods/issues/4955#issuecomment-391803166, or mute the thread https://github.com/notifications/unsubscribe-auth/AH4rV7-E2pXq3zTrATnuYE5KlNZrnH30ks5t1vM6gaJpZM4UKYFU.

jimtrue commented 6 years ago

Thanks for the update! Yeah that's definitely an odd one. Good luck finding the problem!