mirror of
https://github.com/pretix/pretix.git
synced 2026-01-28 01:12:29 +00:00
Compare commits
3 Commits
stable
...
fix-escape
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
888d418d19 | ||
|
|
803d0b1570 | ||
|
|
65fe7b3396 |
@@ -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"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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 '<' not in djmail.outbox[0].body
|
||||
assert '&' 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"><strong>event & co. kg</strong></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 '<' not in djmail.outbox[0].body
|
||||
assert '&' 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 & Text</a>',
|
||||
html
|
||||
)
|
||||
assert 'Escaping {{curly}} {braces}.' in html
|
||||
|
||||
@@ -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}}.
|
||||
|
||||
Reference in New Issue
Block a user