Trim leading and trailing whitespace from selected text before quoting.
Patch by kaisa.
diffs (24 lines):
diff -r 88262a5cf66e -r 5e6c5d092470 cgi-bin/LJ/Talk.pm
--- a/cgi-bin/LJ/Talk.pm Thu Jun 10 18:54:44 2010 +0800
+++ b/cgi-bin/LJ/Talk.pm Thu Jun 10 19:01:12 2010 +0800
@@ -1781,6 +1781,8 @@ sub talkform {
} else if (window.getSelection) {
text = window.getSelection();
}
+
+ text = text.replace(/^\\s+/, '').replace(/\\s+\$/, '');
if (text == '') {
if (helped != 1 && pasted != 1) {
diff -r 88262a5cf66e -r 5e6c5d092470 cgi-bin/weblib.pl
--- a/cgi-bin/weblib.pl Thu Jun 10 18:54:44 2010 +0800
+++ b/cgi-bin/weblib.pl Thu Jun 10 19:01:12 2010 +0800
@@ -803,6 +803,8 @@ sub create_qr_div {
} else if (window.getSelection) {
text = window.getSelection();
}
+
+ text = text.replace(/^\\s+/, '').replace(/\\s+\$/, '');
if (text == '') {
if (helped != 1 && pasted != 1) {
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog