mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Fix copying invoice answers with special chars in placeholder
This commit is contained in:
committed by
GitHub
parent
0079be68d3
commit
943193e8e0
@@ -387,14 +387,14 @@ $(function () {
|
|||||||
var $first_ticket_form = $(".questions-form").first().find("[data-addonidx=0]");
|
var $first_ticket_form = $(".questions-form").first().find("[data-addonidx=0]");
|
||||||
$first_ticket_form.find("[id$=" + this.id.substring(3) + "]").val(this.value);
|
$first_ticket_form.find("[id$=" + this.id.substring(3) + "]").val(this.value);
|
||||||
if (this.placeholder) {
|
if (this.placeholder) {
|
||||||
$first_ticket_form.find("[placeholder='" + this.placeholder + "']").val(this.value);
|
$first_ticket_form.find("[placeholder='" + CSS.escape(this.placeholder) + "']").val(this.value);
|
||||||
}
|
}
|
||||||
var label = $("label[for=" + this.id +"]").first().contents().filter(function () {
|
var label = $("label[for=" + this.id +"]").first().contents().filter(function () {
|
||||||
return this.nodeType != Node.ELEMENT_NODE || !this.classList.contains("sr-only");
|
return this.nodeType != Node.ELEMENT_NODE || !this.classList.contains("sr-only");
|
||||||
}).text().trim();
|
}).text().trim();
|
||||||
if (label) {
|
if (label) {
|
||||||
// match to placeholder and label
|
// match to placeholder and label
|
||||||
$first_ticket_form.find("[placeholder='" + label + "']").val(this.value);
|
$first_ticket_form.find("[placeholder='" + CSS.escape(label) + "']").val(this.value);
|
||||||
var v = this.value;
|
var v = this.value;
|
||||||
$first_ticket_form.find("label").each(function() {
|
$first_ticket_form.find("label").each(function() {
|
||||||
var text = $(this).first().contents().filter(function () {
|
var text = $(this).first().contents().filter(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user