It should add a slash when storing the data. And then you use stripslashes when you want to display it.
$str = "Is your name O\'Reilly?";
echo stripslashes($str); // Outputs: Is your name O'Reilly?
If a slash is not added, all sorts of unexpected things can happen because the apostrophe can be handled as the opening or closing of a string.
Related Posts:
- wp_dequeue_style not working
- Stop a plugin in the activation process when a certain WP version is not met then show error message in admin_notices action hook
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- How to Add an Index to Plugin Database table
- Override WordPress user with Oauth2 account
- How to add “Stick this post to the front page” to front end?
- Creating two database tables via plugin
- Is it a good idea to edit an already existing plugin to add more functionality?
- How to make media upload private? [duplicate]
- How to trace the cause of these PHP notices and warnings for class-wp-query.php?
- Modify featured image URL at runtime
- How to develop a community feature in the dashboard for multiauthor site
- Which hook should be used to validate custom form fields on the login form?
- Using the media uploader in a custom plugin
- Plugin child folder?
- How would one split content of a post into pages?
- Theme and Plugins sharing common libraries
- All Updated Plugins Disappeared
- How to change Thumbnail size of next Gen Gallery plugin?
- How to check what plugins used to be on a WordPress installation?
- Why isn’t “background-image: url”working with Bootstrap carousel on WP?
- Plugin Deactivate Self on Activation Errors
- Form doesn’t submit on second submit call
- What would be the advantages/disadvantages of remote plugin installation?
- How to slice an array using posts_per_page? [closed]
- Show an image in my header.php
- Plugin appends ugly URL string to index
- woocommerce payment gateway callback not firing [closed]
- Installing a plugin on a premium site [closed]
- White page by using filter template_include
- WordPress Keeps Logging Out – What Tests Can I Run to Solve This?
- Facebook Messager Plugin
- How to save inputed data in a textbox [EDITED] [duplicate]
- User switching only with specific role and return
- WP-DownloadManager – Query most download per week/month etc
- How to test ‘upgrader_process_complete’ hook in plugin development?
- Woocommerce Shop page variation product button replace with add to cart button
- How to call plugin functions in a custom template
- How to prevent additional code in functions.php to be removed once there is an update?
- Update a core option from plugin settings page
- How do I pass custom shortcode-extracted variables (taxonomy) into a query function for WordPress RoyalSlider?
- Thesis 2 custom Page
- Display linked articles at the bottom of post (like related posts)
- register_activation_hook() not working as expected
- WooCommerce – set session with new cart item meta when updating cart item quantity [closed]
- Plugin not working & permalink erorr after upgrade to php 7x on Nginx
- Running multiple security plugins
- Opening a JQuery modal window on click of a button with a JQuery plugin
- Can I clone plugin folder to another directory so that I don’t have to reinstall them?
- Woocommerce singe product custom gallery output works just on the first slide
- Correct Plugin File Path
- strange shortcode error: does shortcodes requires any dependency?
- Search by Attachment ID
- Apparent errer when installing plugin
- Issue removing Media Editor Tabs — Duplicate Items
- display link to a custom plugin in admin menu bar
- Creating teams of users in WordPress
- Removing the custom_image_header from wp_head
- Is it safe to use Web Invoice 2.1.0 without SSL?
- A plugin popularity data inside “install new plugin” [closed]
- How to properly replace the_content with the html in a php file?
- Is there a way to make [Table Of Content] plugin while not using revision data?
- How to Add text value in Automatically in this conditions?
- wordpress fcm plugin not working on scheduled posts correctly
- Elementor: How to design Dropdown Select Box Navigation page like Chegg
- Get user edit functions in frontend for site admin
- Critical Error message of WordPress adming
- Displaying all the images from all of my articles
- Problem with Date translation in WordPress
- Create new page in wordpress plugin which doesn’t exist
- Use WordPress Plugin without WP head
- Is it possible to pull all featured images from WP database only?
- install / update plugins remotely
- Creating custom “player-objects”
- 500 Internal server error wp_handle_upload_prefilter
- Forum creation with bbpress and front end
- Migrations for plugins, page and theme: looking for a good approach
- Fatal error when activating my custom wordpress plugin
- Media library and Upload media problem
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- Nested DIV’s across functions in PHP, do not seem to work
- How to move WordPress gallery image out of the link?
- I created a custom form in HTML/CSS and now I need it to submit … should I create custom PHP or is there a plugin I can use?
- Restore Category Base
- Problems with installing and deleting plugins
- Need to change contact email depending where user is from
- How to show an image popup when one clicks on an image thumbnail?
- Add page-link after post content. Before plugin
- What method should I use for a sidebar widget that reads latest posts?
- wordpress last all added get meta value by post id
- Visual Composer Data Source?
- WP Offload S3 Lite “Please setup GD or ImageMagick” noticed
- Possible to add “Template” selector to pages? Is Any Plugins are There..?
- How to add a static image inbetween the product tiles on main shoppage woocommerce?
- Plugin download link
- thumbnail_width not working in wordpress most popular post plugin
- Gravity Forms and Gravity View Permissions
- Admin Notice is only localized when displaying the “Plugins” Backend Page
- How to call a logging function from a generic utility plugin from another plguin
- WordPress – How to add an attribute to a plugin inline script tag