summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorygerasimov2018-10-05 12:46:48 (GMT)
committerOleh Vehera2018-10-05 12:46:48 (GMT)
commit021b0985bfb338abe10b5dbcaf2c57585732d40d (patch)
tree4c2fc094543aa83ac134262d82f7bb7b4164c966
parent122a36084eeb6d18f71ab48dd4d787bf4370cf92 (diff)
Issue #2090701 by ygerasimov, pifagor, alex_optim, voleger: Allow newline in the "rel" link property
-rw-r--r--js/lightbox.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/lightbox.js b/js/lightbox.js
index 061cfd6..481f693 100644
--- a/js/lightbox.js
+++ b/js/lightbox.js
@@ -1072,8 +1072,9 @@ Lightbox = {
parts["flashvars"] = parts["style"].match(/flashvars:\s?(.*?);/)[1];
}
}
- if ($(link).attr('rel').match(/\[.*\]\[(.*)\]/)) {
- parts["title"] = $(link).attr('rel').match(/\[.*\]\[(.*)\]/)[1];
+ if ($(link).attr('rel').match(/\[.*\]\[([\s\S]*)\]/)) {
+ var title = $(link).attr('rel').match(/\[.*\]\[([\s\S]*)\]/)[1];
+ parts["title"] = title.replace(/\n/g, '<br />');
}
return parts;
},