Bugzilla@Mozdev – Bug 25526
If no Signature is defined, %sig% is not removed
Last modified: 2013-08-09 05:57:18
You need to log in before you can comment on or make changes to this bug.
If no Signature is defined, the %sig% variable should be removed. Instead this is inserted: <sig class="st4-signature" removedashes="false">%sig%</sig>
Bug is also relevant for %sig(2)%
Created an attachment (id=7639) [details] 0.9.4 Prerelease 19 To note: I think the bug only manifests if you are using Stationery with a %sig% in it. To try this version, have Stationery support enabled and Stationery0.8 installed. Put the %sig% wherever you like; if there is no signature defined it should now remove the variable.
Your uploaded version works as expected but when there is a signature specified it won't be displayed. Instead only a %sig% is shown: <sig class="st4-signature" removedashes="true">%sig(2)%</sig>
(In reply to comment #3) > Your uploaded version works as expected but when there is a signature specified > it won't be displayed. Instead only a %sig% is shown: > > <sig class="st4-signature" removedashes="true">%sig(2)%</sig> > nice catch - can you test with %sig% as well?
Yes, same problem. But another strange thing: I have mail account A without a signature and mail Account B with a signature specified in the Thunderbird mail account settings. Now when I compose a new mail from mail account A no %sig% is shown as it should. If I go to the inbox folder of mail account B and compose a new mail the %sig% problem occurs. But if I compose a new mail started from the inbox of mail account A and then switch inside of the composing window the mail account to B the signature will be added as it should PLUS -- and the signature again. Look at the source code: <body smarttemplateinserted="true"><div id="smartTemplate4-template"> <title></title> <p> test<br>1st signature </div><br> <br><div class="moz-signature">-- <br> </div></body> So this seems to be another or related bug.
Created an attachment (id=7640) [details] 0.9.4 Prerelease 20 Bugfix - removing %sig% should now also work with sig(2).
(In reply to comment #5) > Yes, same problem. > > But another strange thing: > > Now when I compose a new mail from mail account A no %sig% is shown as it > should. ... > So this seems to be another or related bug. Please raise a separate bug, if I wanted to quash all problems with signatures in the same bug, this could never ever be closed :) Generally it is not a good idea to add related bugs (it is a different test case). In this case, there are indeed different logical flows at work.
Created an attachment (id=7641) [details] Log file of the problem Even with the new version 20 it doesn't work. I have opened another bug report for the other problem with bug #25527
(In reply to comment #8) > Created an attachment (id=7641) [details] [details] > Log file of the problem > > Even with the new version 20 it doesn't work. > > I have opened another bug report for the other problem with bug #25527 > I might have only tested the case %sig(2)% _with_ signature defined. Are you saying it doesn remove if it is _not_ defined?
Created an attachment (id=7643) [details] No signature shown No, that works but it doesn't show the real signature when a signature is specified even if it tried it in the error console first but it is not displayed.
(In reply to comment #10) > Created an attachment (id=7643) [details] [details] > No signature shown > > No, that works but it doesn't show the real signature when a signature is > specified even if it tried it in the error console first but it is not > displayed. > Hmm, prerelease 20 worked for me. I put the signature in the Signature textbox (Account Settings). What are your settings in Account settings? [x] Use HTML Any signature text in the box? [x] Attach the signature Any Filename here? I have written another fix for dealing with %sig(2)% when it is _not_ defined, uploading shortly.
Created an attachment (id=7644) [details] 0.9.4 Prerelease 21 Fixing problem of not removing %sig(2)% when signature is not defined.
Created an attachment (id=7645) [details] 0.9.4 Prerelease 25 Fixed the %sig% processing for the "New mail" case. Looks like a "big fat side effect" which was based on an optional parameter backfired badly. Please test relentlessly! In this version I also added a (Stationery only) variable %quoteHeader% which can be used to insert the contents of the [optional] quote header in the Stationery Template. In the case of "write new" email this is of course simply removed.
With prerelease 25 everything works except for strange and unnecessary <br> and <pre> tags for the HTML signature (even if the option to replace line breaks with <br> is deactivated and no <br> or <pre> tags are added to the HTML signature). Also "<div class="moz-cite-prefix">schrieb Axel Grude (Axel):<br></div>" isn't necessary.
Created an attachment (id=7646) [details] 0.9.4 Prerelease 26 When called from a %quoteHeader% (and possibly also in other circumstances?) the readSignature function made a bad attempt at guessing HTML format when reading attached signature files. This would lead to extra <br> tags and some unnecessary <pre> tags wrapping the signature. This version fixes that.
(In reply to comment #14) > Also "<div class="moz-cite-prefix">schrieb Axel Grude (Axel):<br></div>" isn't > necessary. > Methinks this observation belongs to [Bug 25528]. no bugspam, please :)
(In reply to comment #15) > Created an attachment (id=7646) [details] [details] > 0.9.4 Prerelease 26 > > When called from a %quoteHeader% (and possibly also in other circumstances?) > the readSignature function made a bad attempt at guessing HTML format when > reading attached signature files. This would lead to extra <br> tags and some > unnecessary <pre> tags wrapping the signature. > > This version fixes that. > Bug fixed, everything works perfectly :) Thanks!