1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-09 11:42:28 +01:00

Use backslash instead of HTML entity to escape backticks in Toastr alerts

This commit is contained in:
Chaoyi Zha 2017-03-23 16:31:23 -04:00
parent 2ee1e70eb1
commit 5916eecba0
3 changed files with 8 additions and 8 deletions

View File

@ -28,7 +28,7 @@
</div>
<a href='#' class='btn btn-success license-btn'>More Information</a>
<pre class="license" id="gpl-license">
Copyright (C) 2013-2016 Chaoyi Zha
Copyright (C) 2013-2017 Chaoyi Zha
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License

View File

@ -1,6 +1,6 @@
<!--
Polr, a minimalist URL shortening platform.
Copyright (C) 2013-2016 Chaoyi Zha
Copyright (C) 2013-2017 Chaoyi Zha
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -60,22 +60,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<script>
@if (Session::has('info'))
toastr["info"](`{{str_replace('`', '&#96;', session('info'))}}`, "Info")
toastr["info"](`{{ str_replace('`', '\`', session('info')) }}`, "Info")
@endif
@if (Session::has('error'))
toastr["error"](`{{str_replace('`', '&#96;', session('error'))}}`, "Error")
toastr["error"](`{{str_replace('`', '\`', session('error')) }}`, "Error")
@endif
@if (Session::has('warning'))
toastr["warning"](`{{str_replace('`', '&#96;', session('warning'))}}`, "Warning")
toastr["warning"](`{{ str_replace('`', '\`', session('warning')) }}`, "Warning")
@endif
@if (Session::has('success'))
toastr["success"](`{{str_replace('`', '&#96;', session('success'))}}`, "Success")
toastr["success"](`{{ str_replace('`', '\`', session('success')) }}`, "Success")
@endif
@if (count($errors) > 0)
// Handle Lumen validation errors
@foreach ($errors->all() as $error)
toastr["error"](`{{str_replace('\`', $error)}}`, "Error")
toastr["error"](`{{ str_replace('`', '\`', $error) }}`, "Error")
@endforeach
@endif
</script>

View File

@ -1,6 +1,6 @@
<!--
Polr, a minimalist URL shortening platform.
Copyright (C) 2013-2016 Chaoyi Zha
Copyright (C) 2013-2017 Chaoyi Zha
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License