[Bug 9951] Line breaks at the end of  templates are not saved

Fixed this bug for signatures and templates fields.