Skip to content
Permalink
Browse files

[layouts] Fix label expression contains unicode characters when edited

Fixes #19743
  • Loading branch information
nyalldawson committed Sep 4, 2018
1 parent 15e5809 commit bb9117075d14a748c8ca6632cd23cb5668abc4f5
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/app/layout/qgslayoutlabelwidget.cpp
@@ -187,6 +187,9 @@ void QgsLayoutLabelWidget::mInsertExpressionButton_clicked()

QString selText = mTextEdit->textCursor().selectedText();

// html editor replaces newlines with Paragraph Separator characters - see https://issues.qgis.org/issues/19743
selText = selText.replace( QChar( 0x2029 ), QChar( '\n' ) );

// edit the selected expression if there's one
if ( selText.startsWith( QLatin1String( "[%" ) ) && selText.endsWith( QLatin1String( "%]" ) ) )
selText = selText.mid( 2, selText.size() - 4 );

0 comments on commit bb91170

Please sign in to comment.
You can’t perform that action at this time.