Compare commits

..

3 Commits

Author SHA1 Message Date
Mira Weller
888d418d19 Add escaping example to test cases 2026-01-27 12:47:31 +01:00
Richard Schreiber
803d0b1570 Fix missing locale in widget waitinglist 2026-01-26 16:52:37 +01:00
Raphael Michel
65fe7b3396 Bump version to 2026.2.0.dev0 2026-01-26 16:52:09 +01:00
4 changed files with 11 additions and 6 deletions

View File

@@ -19,4 +19,4 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# <https://www.gnu.org/licenses/>.
#
__version__ = "2026.1.0"
__version__ = "2026.2.0.dev0"

View File

@@ -301,15 +301,14 @@ Vue.component('availbox', {
return this.avail[0] < 100 && this.$root.waiting_list_enabled && this.item.allow_waitinglist;
},
waiting_list_url: function () {
var u
var u = this.$root.target_url + 'w/' + widget_id + '/waitinglist/?locale=' + lang + '&item=' + this.item.id
if (this.item.has_variations) {
u = this.$root.target_url + 'w/' + widget_id + '/waitinglist/?item=' + this.item.id + '&var=' + this.variation.id + '&widget_data=' + encodeURIComponent(this.$root.widget_data_json) + this.$root.consent_parameter;
} else {
u = this.$root.target_url + 'w/' + widget_id + '/waitinglist/?item=' + this.item.id + '&widget_data=' + encodeURIComponent(this.$root.widget_data_json) + this.$root.consent_parameter;
u += '&var=' + this.variation.id
}
if (this.$root.subevent) {
u += '&subevent=' + this.$root.subevent
}
u += '&widget_data=' + encodeURIComponent(this.$root.widget_data_json) + this.$root.consent_parameter
return u
}
},

View File

@@ -202,6 +202,7 @@ def test_placeholder_html_rendering_from_template(env):
assert '**Meta**: *Beep*' in djmail.outbox[0].body
assert 'Event website: [<strong>event & co. kg</strong>](https://example.org/dummy)' in djmail.outbox[0].body
assert 'Other website: [<strong>event & co. kg</strong>](https://example.com)' in djmail.outbox[0].body
assert 'Escaping {{curly}} {braces}.' in djmail.outbox[0].body
assert '&lt;' not in djmail.outbox[0].body
assert '&amp;' not in djmail.outbox[0].body
html = _extract_html(djmail.outbox[0])
@@ -218,6 +219,7 @@ def test_placeholder_html_rendering_from_template(env):
r'Other website: <a href="https://example.com" rel="noopener" style="[^"]+" target="_blank">&lt;strong&gt;event &amp; co. kg&lt;/strong&gt;</a>',
html
)
assert 'Escaping {{curly}} {braces}.' in html
@pytest.mark.django_db
@@ -230,6 +232,7 @@ def test_placeholder_html_rendering_from_string(env):
"URL with text: <a href=\"{url}\">Test</a>\n\n"
"URL with params: https://example.com/form?action=foo&eventid={event_slug}\n\n"
"URL with params and text: [Link & Text](https://example.com/form?action=foo&eventid={event_slug})\n\n"
"Escaping {{{{curly}}}} {{braces}}.\n\n"
})
djmail.outbox = []
event, user, organizer = env
@@ -253,6 +256,7 @@ def test_placeholder_html_rendering_from_string(env):
assert 'URL with text: <a href="https://google.com">Test</a>' in djmail.outbox[0].body
assert 'URL with params: https://example.com/form?action=foo&eventid=dummy' in djmail.outbox[0].body
assert 'URL with params and text: [Link & Text](https://example.com/form?action=foo&eventid=dummy)' in djmail.outbox[0].body
assert 'Escaping {{curly}} {braces}.' in djmail.outbox[0].body
assert '&lt;' not in djmail.outbox[0].body
assert '&amp;' not in djmail.outbox[0].body
html = _extract_html(djmail.outbox[0])
@@ -286,3 +290,4 @@ def test_placeholder_html_rendering_from_string(env):
r'style="[^"]+" target="_blank">Link &amp; Text</a>',
html
)
assert 'Escaping {{curly}} {braces}.' in html

View File

@@ -10,4 +10,5 @@ Payment info:
**Meta**: {meta_Test}
Event website: [{event}](https://example.org/{event_slug})
Other website: [{event}]({meta_Website})
Other website: [{event}]({meta_Website})
Escaping {{{{curly}}}} {{braces}}.