For a quiz question, add in content for the Result Clarification which includes a backslash
Save Changes
Refresh the page
Expected Behavior
The backslash characters are preserved.
Actual Behavior
The backslash characters are removed.
Tech Notes
From investigation, the slashes are present right up until the call to update_post_meta in abstract.llms.post.model.php::update_meta_properties. The documentation states that there is a call to stripslashes() so to compensate, we need to call wp_slash() beforehand:
Reproduction Steps
Expected Behavior
The backslash characters are preserved.
Actual Behavior
The backslash characters are removed.
Tech Notes
From investigation, the slashes are present right up until the call to
update_post_meta
inabstract.llms.post.model.php::update_meta_properties
. The documentation states that there is a call tostripslashes()
so to compensate, we need to callwp_slash()
beforehand:https://developer.wordpress.org/reference/functions/update_post_meta/#more-information
However we're also stripping the slashes within LLMS_Admin_Builder::handle_ajax()
We may want to avoid doing this?
This issue has be recreated: