Skip to content

Commit c145359

Browse files
committed
Fix set encoding= functionality
1 parent 9e519de commit c145359

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

common/content/browser.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ const Browser = Module("browser", {
4343
// Stolen from browser.jar/content/browser/browser.js, more or less.
4444
try {
4545
config.browser.docShell.QueryInterface(Ci.nsIDocCharset).charset = val;
46-
PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val);
46+
if (PlacesUtils.history.setCharsetForURI !== undefined)
47+
PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val);
48+
else
49+
PlacesUtils.setCharsetForURI(getWebNavigation().currentURI, val);
4750
getWebNavigation().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
4851
}
4952
catch (e) { liberator.echoerr(e); }

0 commit comments

Comments
 (0)