Open ns-rx opened 3 months ago
If I entered `09/04/1984` as the date (i.e. it contains slashes), then this bit might get a bit mangled. By default, WordPress will add slashes to superglobal values, so you need to unslash them before sanitizing them:
update_post_meta( $post_id, 'poem_date', sanitize_text_field( wp_unslash( $_POST['poem_date'] ) ) );
Otherwise, the displayed value may end up as 09//04//1984 etc.
09//04//1984
_Originally posted by @GaryJones in https://github.com/ns-rx/poetwp/pull/13#discussion_r1730398196_
Also https://github.com/ns-rx/poetwp/pull/13#discussion_r1730398298
Otherwise, the displayed value may end up as
09//04//1984
etc._Originally posted by @GaryJones in https://github.com/ns-rx/poetwp/pull/13#discussion_r1730398196_