diff --git a/src/backends/R/rexpression.cpp b/src/backends/R/rexpression.cpp --- a/src/backends/R/rexpression.cpp +++ b/src/backends/R/rexpression.cpp @@ -124,9 +124,10 @@ content.replace( QLatin1Char(' '), QLatin1String(" ")); //replace appearing backspaces, as they mess the whole output up content.remove(QRegExp(QLatin1String(".\b"))); - //Replace < and > with their html code, so they won't be confused as html tags + //Replace <, > and & with their html code, so they won't be confused as html tags content.replace( QLatin1Char('<') , QLatin1String("<")); content.replace( QLatin1Char('>') , QLatin1String(">")); + content.replace( QLatin1Char('&') , QLatin1String("&")); } qDebug()<<"content: "<