diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py
index 29b8c3335..e4cdecd72 100644
--- a/openlp/core/lib/htmlbuilder.py
+++ b/openlp/core/lib/htmlbuilder.py
@@ -140,8 +140,11 @@ sup {
if(outline != null)
txt = outline;
if(window.getComputedStyle(txt).webkitTextStrokeWidth != '0px'){
- newtext = '' + newtext.replace(/[ ](?![^<]*>)/g,
- ' ') + '';
+ newtext = newtext.replace(/(\s| )+(?![^<]*>)/g,
+ function(match) {
+ return '' + match + '';
+ });
+ newtext = '' + newtext + '';
}
}
text_fade('lyricsmain', newtext);