浏览代码

fixed section links

Markus-Rost 6 年之前
父节点
当前提交
9eca2cc0fc
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      main.js

+ 1 - 1
main.js

@@ -935,7 +935,7 @@ String.prototype.toTitle = function() {
 };
 
 String.prototype.toSection = function() {
-	return encodeURIComponent( this.replace( / /g, '_' ) ).replace( /\'/g, '%27' ).replace( /\%/g, '.' );
+	return encodeURIComponent( this.replace( / /g, '_' ) ).replace( /\'/g, '%27' ).replace( /\(/g, '%28' ).replace( /\)/g, '%29' ).replace( /\%/g, '.' );
 };
 
 String.prototype.wikicode = function() {