Bugzilla – Attachment 47645 Details for
Bug 15735
Audio Alerts editor broken by use of of single quotes in editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF]Bug 15735: Audio Alerts editor broken by use of of single quotes in editor
SIGNED-OFFBug-15735-Audio-Alerts-editor-broken-by-.patch (text/plain), 2.67 KB, created by
Héctor Eduardo Castro Avalos
on 2016-02-04 15:05:25 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 15735: Audio Alerts editor broken by use of of single quotes in editor
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-02-04 15:05:25 UTC
Size:
2.67 KB
patch
obsolete
>From 06fa496c26a03fa48b41119c3ffa60a74dba2d80 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 3 Feb 2016 19:05:19 +0000 >Subject: [PATCH] [SIGNED-OFF]Bug 15735: Audio Alerts editor broken by use of > of single quotes in editor > >Single quotes audio selector break ability to edit an alert > >Test Plan: >1) Enable audio alerts >2) Add new a alert with a select containing single quotes such as: input[name*='test'] >3) Note you cannot edit the alert >4) Apply this patch >5) Reload the page >6) You should now be able to edit the alert > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Bug 15734 applied on top. Works as advertised >--- > koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >index 4dbfc11..f894902 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >@@ -69,7 +69,7 @@ > <script type="text/javascript"> > //<![CDATA[ > var AUDIO_ALERT_PATH = '[% interface %]/[% theme %]/sound/'; >- var AUDIO_ALERTS = JSON.parse( '[% AudioAlerts.AudioAlerts.raw | replace( "'", "\\'" ) %]' ); >+ var AUDIO_ALERTS = JSON.parse( '[% AudioAlerts.AudioAlerts.raw | replace( "'", "\\'" ) | replace( '"', '\\"' ) %]' ); > //]]> > > $( document ).ready(function() { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt >index 489c542..df4a24b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt >@@ -157,7 +157,7 @@ function EditAlert( elt, id, precedence, selector, sound ) { > </td> > <td>[% a.selector %]</td> > <td>[% a.sound %]</td> >- <td><a class="btn btn-small" onclick="EditAlert( this, '[% a.id %]','[% a.precedence %]', '[% a.selector %]', '[% a.sound %]' )" ><i class="icon-pencil"></i> Edit</a></td> >+ <td><a class="btn btn-small" onclick="EditAlert( this, '[% a.id %]','[% a.precedence %]', '[% a.selector.raw | replace( "'", "\\'" ) | html %]', '[% a.sound %]' )" ><i class="icon-pencil"></i> Edit</a></td> > </tr> > [% END %] > </tbody> >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15735
:
47622
|
47623
|
47645
|
47736
|
48763