[smartymixed] Smarty tags in HTML attributes break

Closes #1768

A smarty tag in an HTML attribute would break syntax highlighting as the parser would switch to smarty mode and never switch back. 

Simple test scenario to reproduce:

```html
<a href="{$var}">test</a>
```

This doesn't break it:

```html
<a href="">{$var}</a>
```

To test my fix, I took a diff of the CodeMirror generated source for a few different examples and diffed them before and after my patch, there were no changes. However, the patch fixed all of my examples that used variables in HTML attributes.