Maybe we could extract this into a separate method? Something like:

```
ReplaceVariableInHtml(QString &html, const QString &variable, const QString &value)
{
    html = html.replace(variable, value, Qt::CaseInsensitive);
}
```

We could then add an overload of bool values:

```
ReplaceVariableInHtml(QString &html, const QString &variable, bool value)
{
    html = html.replace(variable, value ? "true" : "false", Qt::CaseInsensitive);
}
```

Just an idea.