[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [FIX] Calendar: Display pipes, colons and less than symbols in the event title
"Adrien Mbuya Maloba \(@adrienmaloba\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6897daa85137a_2cd60248371@gitlab-sidekiq-low-urgency-cpu-bound-v2-fc86f445f-npr6d.mail> |
Adrien Mbuya Maloba pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki
Commits:
514cdf9a by Adrien Mbuya Maloba at 2025-08-10T02:26:10+03:00
[FIX] Calendar: Display pipes, colons and less than symbols in the event title
---
* [FIX] Calendar: Display pipes, colons and less than symbols in the event title
See merge request tikiwiki/tiki!8254
- - - - -
2 changed files:
- lib/jquery_tiki/tiki-jquery.js
- src/js/jquery-tiki/tiki-calendar.js
Changes:
=====================================
lib/jquery_tiki/tiki-jquery.js
=====================================
@@ -5125,3 +5125,10 @@ $.fn.toastNotification = function (options) {
})(options.delay, currentid);
}
};
+
+// Escaping any pipes (|), colons (:) and less than symboles (<) which can be used as special characters for the tooltip
+// Use to escape characters for the event calendar tooltip
+function tooltipEscape(title) {
+ const escapedTitle = title.replace(/\|/g, "|").replace(/\:/g, ":").replace(/\</g, "<");
+ return escapedTitle;
+}
=====================================
src/js/jquery-tiki/tiki-calendar.js
=====================================
@@ -178,7 +178,8 @@ $.fn.setupFullCalendar = function (fullCalendarParams) {
});
}
}
- element.attr("title", event.title + "|" + event.extendedProps.description);
+ const eventTitle = tooltipEscape(event.title);
+ element.attr("title", eventTitle + "|" + event.extendedProps.description);
element.addClass("tips");
// surely there's a better way?
$(element).parent().tiki_popover();
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/514cdf9a778a66502dbf451f9f0e1903e9e3d43e
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/514cdf9a778a66502dbf451f9f0e1903e9e3d43e
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs