fix(web): json_encode for input enter in /user/msg

This commit fixes #79.
Ref: https://huntr.dev/bounties/a2b63a25-385f-4f4e-b790-d910b90718f7/
This commit is contained in:
billchenchina 2021-09-09 21:25:44 +08:00
parent 9edd28541e
commit ebf541ab91
No known key found for this signature in database
GPG Key ID: 90EAD6E362C2E2D3

View File

@ -151,7 +151,7 @@ $(document).ready(function() {
$.ajaxSetup({async:false});
refreshConversations();
<?php if (isset($_GET['enter'])): ?>
enterConversation("<?= $_GET['enter'] ?>");
enterConversation(<?= json_encode($_GET['enter']) ?>);
<?php endif ?>
});
</script>