Go to file
Emily Lamancusa 25c36c5884
Bug 40030: Escape values when displaying action logs comparison
When viewing the action logs for a system preference change, there is an
option to view a comparison between different log lines for the same
system preference. However, if a system preference value contains HTML
markup (e.g. in IntranetUserJS), the diff text is only escaped on
sections where a change is marked, so unchanged lines containing HTML
markup result in the HTML being rendered.

Escape the string values for unchanged sections as well, to ensure that
HTML markup in the diff text will not be rendered.

To test:
1. Edit IntranetUserJS and add some code that contains HTML markup.
   For example:
$("body").append('<a id="helloworld" class="btn btn-default">Say hi</a>');
2. Save the preference
3. Make another change to IntranetUserJS that does not affect the line
   you just added, and save again to ensure there are at least 2 action
   log lines for comparison
4. Go to Tools > Log viewer
5. Select System Preferences module and Submit
6. Find the log entries for the above two revisions to IntranetUserJS
7. Check the Compare checkboxes on those entries, and click View
   comparison
--> Note that the HTML button is rendered in the comparison
8. Apply patch
9. Clear browser cache and refresh the page
10. Repeat step 7
--> The button is not rendered and the code is displayed as written
11. Make a change to the line you added in step 1 (for example, replace
    "Say hi" with "Say hello")
12. Refresh the page
13. Check the checkboxes for the newest 2 log entries and click View
    comparison to view the diff for that last change
--> Confirm the change is shown correctly - the button is not rendered
    and nothing has been double-escaped

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 78dbb72ce9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-07-10 22:47:22 +02:00
C4 Bug 34776: Add unit tests for sub restore_form_values 2025-07-10 22:47:22 +02:00
Koha Bug 40254: Fix error in overrides check allowing too much 2025-07-10 22:47:17 +02:00
acqui Bug 40066: Restore budget check to booksellers.pl 2025-06-17 21:43:04 +02:00
admin Bug 40033: Call GetPlugins correctly in background_jobs.pl 2025-06-17 21:43:03 +02:00
api Bug 39657: Spec changes 2025-07-10 22:47:15 +02:00
authorities Bug 39834: Replace some tabs with spaces 2025-06-17 21:42:59 +02:00
basket Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
bin
…
bookings Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
catalogue Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
cataloguing Bug 39834: Replace some tabs with spaces 2025-06-17 21:42:59 +02:00
circ Bug 39834: Replace some tabs with spaces 2025-06-17 21:42:59 +02:00
clubs Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
course_reserves Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
debian Bug 40039: Add production enhancements to build-git-snapshot tool 2025-07-10 22:47:18 +02:00
docs Bug 40022: Sync teams in Koha, Wiki and release-tools 2025-07-10 22:47:12 +02:00
erm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
errors Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
etc Bug 39206: Modify koha-conf templates 2025-07-10 22:47:10 +02:00
ill Bug 30200: Add custom tabs to View ILL requests page 2025-05-08 08:49:57 +02:00
installer Increment version for 25.05.01 release 2025-06-24 18:38:09 +02:00
koha-tmpl Bug 40030: Escape values when displaying action logs comparison 2025-07-10 22:47:22 +02:00
labels Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
lib Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
members Bug 34776: Remove unneeded if statement 2025-07-10 22:47:22 +02:00
misc Bug 40144: Get rid of `sip_cli_emulator.pl` warnings 2025-07-09 11:36:41 +02:00
offline_circ Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac Bug 39498: Correct patron restrictions displays 2025-07-10 22:47:14 +02:00
patron_lists Bug 37266: patron_lists/delete.pl should have CSRF protection 2025-03-06 13:54:49 +01:00
patroncards Bug 39800: Error 500 when trying to delete patron card template 2025-05-19 09:49:41 +02:00
plugins Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
pos Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
preservation Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
recalls Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
reports Bug 39866: (QA follow-up) Rudimentary validation of line/column 2025-06-17 21:43:02 +02:00
reserve Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
reviews Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
rotating_collections Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
serials Bug 34971: (QA follow-up) Op is now cud-reopen 2025-02-12 15:28:17 +01:00
services Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
skel
…
suggestion Bug 33430: (follow-up) Fix the data filtering from the left menu 2025-05-19 18:54:22 +02:00
svc Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
t Bug 34776: Add unit tests for sub restore_form_values 2025-07-10 22:47:22 +02:00
tags Bug 38969: (QA follow-up) fix tidy 2025-04-28 18:51:18 +02:00
tools Bug 39871: (QA follow-up) Do not hardcode nullable check 2025-07-10 22:47:21 +02:00
virtualshelves Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC 2025-02-13 16:18:02 +01:00
xt Bug 39741: Make valid-templates.t handle dirs 2025-05-06 18:48:27 +02:00
.codespell-ignore Bug 39325: (QA follow-up) Adjust some issues 2025-04-28 18:51:30 +02:00
.editorconfig
…
.git-blame-ignore-revs Bug 39096: Add 'tidy all' commits to a git blame ignore file 2025-02-17 13:10:25 +01:00
.gitignore Bug 30200: Add custom tabs to View ILL requests page 2025-05-08 08:49:57 +02:00
.htaccess
…
.mailmap 25.05.00: Update .mailmap (part 4) 2025-05-26 10:19:09 -03:00
.perlcriticrc
…
.perltidyrc
…
.prettierrc.js Bug 38664: Treat .vue files like other JS files 2025-02-11 14:58:25 +01:00
.proverc.dist
…
.stylelintrc.json
…
INSTALL
…
Koha.pm Increment version for 25.05.01 release 2025-06-24 18:38:09 +02:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 39834: Replace some tabs with spaces 2025-06-17 21:42:59 +02:00
README
…
README.md
…
README.robots
…
about.pl Bug 39154: Add sip.log test in about 2025-03-07 18:02:58 +01:00
app.psgi Bug 36149: Add userenv middleware to app.psgi 2024-05-14 15:04:37 -03:00
build-resources.PL
…
changelanguage.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
cpanfile Bug 39367: Add new dependency 2025-04-23 09:35:16 +02:00
cypress.config.ts Bug 38770: Remove @vue/cli-service and babel 2025-01-16 15:56:15 +01:00
eslint.config.mjs Bug 38524: Enable ESLint for .ts and .vue files 2025-01-16 15:56:17 +01:00
fix-perl-path.PL Bug 39325: (QA follow-up) Adjust some issues 2025-04-28 18:51:30 +02:00
gulpfile.js Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
help.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
kohaversion.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
mainpage.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
package.json Bug 37911: (follow-up) Reintroduce @koha-community/prettier-plugin-template-toolkit 2025-04-28 11:13:45 +02:00
rewrite-config.PL Bug 39834: Replace some tabs with spaces 2025-06-17 21:42:59 +02:00
rspack.config.js Bug 38010: (QA follow-up) Rebase on main 2025-05-02 17:19:15 +02:00
tsconfig.json
…
yarn.lock Bug 37911: Update yarn.lock 2025-04-28 11:13:46 +02:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo