My html attribute is like below:
<span>
<input
class="editWidgetName"
type="text"
maxlength="100"
value="Untitled "NAME" 30\10\2017"
style="display:none;padding-right:1px;"
/>
</span>
I can't fetch the value of the above 'editWidgetName' class. It's always fetching 'Untitled ' only. The string after '"' portion is getting omitted.
I tried javascript to escape the '"' like:
value.replace(/\"/g, '\\"')
, but the result is same.
Again, I tried with encoding the value attribute using js function like:
function encodeHTML(s) {
return s.split('&').join('&')
.split('<').join('<')
.split('"').join('"')
.split("'").join(''');
}
but result is fetching as 'Undefined'.
Please suggest another way to resolve this. Thanks.