nodebb-plugin-onekite-calendar 2.0.70 → 2.0.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/client.js +10 -3
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -169,6 +169,13 @@ define('forum/calendar-onekite', ['alerts', 'bootbox', 'hooks'], function (alert
|
|
|
169
169
|
.replace(/'/g, ''');
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
function linkifyNotes(str) {
|
|
173
|
+
return escapeHtml(str).replace(
|
|
174
|
+
/https?:\/\/[^\s<>"']+/g,
|
|
175
|
+
url => `<a href="${url}" target="_blank" rel="noopener noreferrer">${url}</a>`
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
172
179
|
function getCsrfToken() {
|
|
173
180
|
try {
|
|
174
181
|
return (
|
|
@@ -1809,7 +1816,7 @@ function toDatetimeLocalValue(date) {
|
|
|
1809
1816
|
${calHtml}
|
|
1810
1817
|
${participantsHtml}
|
|
1811
1818
|
${addr ? `<div class="mb-2"><strong>Adresse</strong><br>${addrHtml}</div>` : ''}
|
|
1812
|
-
${notes ? `<div class="mb-2"><strong>Notes</strong><br>${
|
|
1819
|
+
${notes ? `<div class="mb-2"><strong>Notes</strong><br>${linkifyNotes(notes).replace(/\n/g,'<br>')}</div>` : ''}
|
|
1813
1820
|
`;
|
|
1814
1821
|
const canDel = !!(p.canDeleteSpecial || canDeleteSpecial);
|
|
1815
1822
|
const canEdit = !!p.canEditSpecial;
|
|
@@ -1987,7 +1994,7 @@ function toDatetimeLocalValue(date) {
|
|
|
1987
1994
|
${calHtml}
|
|
1988
1995
|
${participantsHtml}
|
|
1989
1996
|
${addr ? `<div class="mb-2"><strong>Adresse</strong><br>${addrHtml}</div>` : ''}
|
|
1990
|
-
${notes ? `<div class="mb-2"><strong>Notes</strong><br>${
|
|
1997
|
+
${notes ? `<div class="mb-2"><strong>Notes</strong><br>${linkifyNotes(notes).replace(/\n/g,'<br>')}</div>` : ''}
|
|
1991
1998
|
`;
|
|
1992
1999
|
const canDel = !!(p.canDeleteOuting);
|
|
1993
2000
|
const canEditOuting = !!p.canEditOuting;
|
|
@@ -2160,7 +2167,7 @@ function toDatetimeLocalValue(date) {
|
|
|
2160
2167
|
${pickupAddress ? `${escapeHtml(pickupAddress)}<br>` : ''}
|
|
2161
2168
|
${pickupTime ? `Heure : ${escapeHtml(pickupTime)}<br>` : ''}
|
|
2162
2169
|
${hasCoords ? `<a href="${osmLink}" target="_blank" rel="noopener">Voir sur la carte</a><br>` : ''}
|
|
2163
|
-
${notes ? `<div class="mt-1"><strong>Notes</strong><br>${
|
|
2170
|
+
${notes ? `<div class="mt-1"><strong>Notes</strong><br>${linkifyNotes(notes).replace(/\n/g,'<br>')}</div>` : ''}
|
|
2164
2171
|
</div>
|
|
2165
2172
|
`
|
|
2166
2173
|
: '';
|