diff --git a/Telegram/Resources/iv_html/page.js b/Telegram/Resources/iv_html/page.js
index 26cab565c..0139f4c91 100644
--- a/Telegram/Resources/iv_html/page.js
+++ b/Telegram/Resources/iv_html/page.js
@@ -42,7 +42,7 @@ var IV = {
} else if (target.hash.length < 2) {
IV.jumpToHash('');
} else {
- IV.jumpToHash(target.hash.substr(1));
+ IV.jumpToHash(decodeURIComponent(target.hash.substr(1)));
}
e.preventDefault();
},
diff --git a/Telegram/SourceFiles/iv/iv_controller.cpp b/Telegram/SourceFiles/iv/iv_controller.cpp
index fcbab153a..c62debebf 100644
--- a/Telegram/SourceFiles/iv/iv_controller.cpp
+++ b/Telegram/SourceFiles/iv/iv_controller.cpp
@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/platform/base_platform_info.h"
#include "base/invoke_queued.h"
#include "base/qt_signal_producer.h"
+#include "base/qthelp_url.h"
#include "iv/iv_data.h"
#include "lang/lang_keys.h"
#include "ui/platform/ui_platform_window_title.h"
@@ -615,7 +616,7 @@ QByteArray Controller::navigateScript(int index, const QString &hash) {
return "IV.navigateTo("
+ QByteArray::number(index)
+ ", '"
- + EscapeForScriptString(hash.toUtf8())
+ + EscapeForScriptString(qthelp::url_decode(hash).toUtf8())
+ "');";
}