diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 99761713e47d52ba30a873f10725ac7d41127a54..3290bce938980e1fe5b83bc2cc3dd8c36ec75d69 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2788,7 +2788,10 @@ bool LLTextEditor::loadFromFile(const std::string& filename)
 	buffer[nread] = '\0';
 	fclose(file);
 
-	setText(LLStringExplicit(buffer));
+	std::string text = std::string(buffer);
+	LLStringUtil::replaceTabsWithSpaces(text, LLTextEditor::spacesPerTab());
+
+	setText(LLStringExplicit(text));
 	delete[] buffer;
 
 	return true;
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index d07eaa540daf380b84f97704f532a27b1eb037c4..37d94ef3503b677b9df1ac3f55a5614da7fe1c2e 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -599,7 +599,6 @@ void LLScriptEdCore::makeEditorPristine()
 
 bool LLScriptEdCore::loadScriptText(const std::string& filename)
 {
-// ALCHEMYMERGE
 // [SL:KB] - Patch: Build-AssetRecovery | Checked: 2013-07-28 (Catznip-3.6)
 	return mEditor->loadFromFile(filename);
 // [/SL:KB]