[dw-free] %%url%% only substituted once in crossposting footer preview
[commit: http://hg.dwscoalition.org/dw-free/rev/5b3ad1484f48]
http://bugs.dwscoalition.org/show_bug.cgi?id=2554
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.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2554
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
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/DW/Setting/XPostAccounts.pm
-------------------------------------------------------------------------------- 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; } --------------------------------------------------------------------------------