JSFiddle - React, Tailwind, and code Playground
by gubhaju
HTML
<input type="text" name="text"><br>
<input type="text" name="text1"><br>
<input type="button">
JavaScript
function stripslashes(str) {
str=str.replace(/\\'/g,'\'');
str=str.replace(/\\"/g,'"');
str=str.replace(/\\0/g,'\0');
str=str.replace(/\\\\/g,'\\');
return str;
}
$(document).ready(function(){
$('button').click(function(){
$('input[name="text1"]').val(stripslashes($('input[name="text"]').val()))
})
})