Fix the preview for the crossposting footer, when there multiple
instances of special variables (e.g., two %%url%%); the actual footer already
works as expected.
Patch by allen.
diffs (18 lines):
diff -r 4d08c1afa86e -r 5b3ad1484f48 cgi-bin/DW/Setting/XPostAccounts.pm
--- a/cgi-bin/DW/Setting/XPostAccounts.pm Wed Apr 28 23:26:14 2010 -0700
+++ b/cgi-bin/DW/Setting/XPostAccounts.pm Wed Apr 28 23:38:15 2010 -0700
@@ -171,10 +171,10 @@ sub option {
previewString = previewString.replace(/\\r/g, "");
previewString = previewString.replace(/\\n/g, "\\r\\n");
previewString = substrUtf(previewString, $footer_length);
- previewString = previewString.replace(/%%url%%/,
'$baseurl/12345.html');
- previewString = previewString.replace(/%%reply_url%%/,
'$baseurl/12345.html?mode=reply');
- previewString = previewString.replace(/%%comment_url%%/,
'$baseurl/12345.html#comments');
- previewString = previewString.replace(/%%comment_image%%/, '<img
src="$baseurl/tools/commentcount?samplecount=23" width="30" height="12"
alt="$alttext" style="vertical-align: middle;"/>');
+ previewString = previewString.replace(/%%url%%/gi,
'$baseurl/12345.html');
+ previewString = previewString.replace(/%%reply_url%%/gi,
'$baseurl/12345.html?mode=reply');
+ previewString = previewString.replace(/%%comment_url%%/gi,
'$baseurl/12345.html#comments');
+ previewString = previewString.replace(/%%comment_image%%/gi, '<img
src="$baseurl/tools/commentcount?samplecount=23" width="30" height="12"
alt="$alttext" style="vertical-align: middle;"/>');
\$('footer_preview').innerHTML = previewString;
}
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog