PageSourceSearch

https://gsei.com.cn/ueditor/ueditor.config.js

js gsei.com.cn collected 2026-10-02 11:44:05 UTC 24,557 bytes, 505 lines download raw bytes

1/**
2 * ueditor完整配置项
3 * 可以在这里配置整个编辑器的特性
4 */
5/**************************提示********************************
6 * 所有被注释的配置项均为UEditor默认值。
7 * 修改默认配置请首先确保已经完全明确该参数的真实用途。
8 * 主要有两种修改方案,一种是取消此处注释,然后修改成对应参数;另一种是在实例化编辑器时传入对应参数。
9 * 当升级编辑器时,可直接使用旧版配置文件替换新版配置文件,不用担心旧版配置文件中因缺少新功能所需的参数而导致脚本报错。
10 **************************提示********************************/
11
12(function () {
13
14    /**
15     * 编辑器资源文件根路径。它所表示的含义是:以编辑器实例化页面为当前路径,指向编辑器资源文件(即dialog等文件夹)的路径。
16     * 鉴于很多同学在使用编辑器的时候出现的种种路径问题,此处强烈建议大家使用"相对于网站根目录的相对路径"进行配置。
17     * "相对于网站根目录的相对路径"也就是以斜杠开头的形如"/myProject/ueditor/"这样的路径。
18     * 如果站点中有多个不在同一层级的页面需要实例化编辑器,且引用了同一UEditor的时候,此处的URL可能不适用于每个页面的编辑器。
19     * 因此,UEditor提供了针对不同页面的编辑器可单独配置的根路径,具体来说,在需要实例化编辑器的页面最顶部写上如下代码即可。当然,需要令此处的URL等于对应的配置。
20     * window.UEDITOR_HOME_URL = "/xxxx/xxxx/";
21     */
22	var URL = P8CONFIG.RESOURCE+'/ueditor/';
23	var Resource = P8CONFIG.attachment_storate_type == 'relative_url' ? '' : (P8CONFIG.attachment_storate_type == 'static_attachment_storage' ? P8CONFIG.attachment_url :P8CONFIG.RESOURCE_VICE);
24	var StorePath = (typeof Storate_Type !== 'undefined') ? (Storate_Type ? 'local' : '') : '';
25    /**
26     * 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
27     */
28    window.UEDITOR_CONFIG = {
29
30        //为编辑器实例添加一个路径,这个不能被注释
31        UEDITOR_HOME_URL: URL
32		, Resource : Resource
33
34        // 服务器统一请求接口路径
35        , serverUrl: P8CONFIG.url+'/ueditor/' + "php/?system="+SYSTEM+"&module="+MODULE+"&store_path="+StorePath+"&p8session="+get_cookie('P8SESSION')
36
37        //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义
38        , toolbars: [[
39            'fullscreen', 'source', '|', 'undo', 'redo', '|',
40            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
41            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
42            'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
43            'directionalityltr', 'directionalityrtl', 'indent', '|',
44            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
45            'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
46            'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'pagebreak', 'template', 'background', '|',
47            'horizontal', 'date', 'time', 'spechars', 'wordimage', 'catchremoteimage','|',
48            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
49            'print', 'preview', 'searchreplace', 'drafts', 'help', 'wordupload', 'excelupload', 'pdftoimage','pdfupload'
50        ]]
51        //当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
52        //,labelMap:{
53        //    'anchor':'', 'undo':''
54        //}
55
56        //语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
57        //lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
58        //,lang:"zh-cn"
59        //,langPath:URL +"lang/"
60
61        //主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件:
62        //现有如下皮肤:default
63        //,theme:'default'
64        //,themePath:URL +"themes/"
65
66        //,zIndex : 900     //编辑器层级的基数,默认是900
67
68        //针对getAllHtml方法,会在对应的head标签中增加该编码设置。
69        //,charset:"utf-8"
70
71        //若实例化编辑器的页面手动修改的domain,此处需要设置为true
72        //,customDomain:false
73
74        //常用配置项目
75        //,isShow : true    //默认显示编辑器
76
77        //,textarea:'editorValue' // 提交表单时,服务器获取编辑器提交内容的所用的参数,多实例时可以给容器name属性,会将name给定的值最为每个实例的键值,不用每次实例化的时候都设置这个值
78
79        //,initialContent:'欢迎使用ueditor!'    //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
80
81        //,autoClearinitialContent:true //是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
82
83        //,focus:false //初始化时,是否让编辑器获得焦点true或false
84
85        //如果自定义,最好给p标签如下的行高,要不输入中文时,会有跳动感
86        //,initialStyle:'p{line-height:1em}'//编辑器层级的基数,可以用来改变字体等
87
88        //,iframeCssUrl: URL + '/themes/iframe.css' //给编辑区域的iframe引入一个css文件
89
90        //indentValue
91        //首行缩进距离,默认是2em
92        //,indentValue:'2em'
93
94        ,initialFrameWidth:1000  //初始化编辑器宽度,默认1000
95        ,initialFrameHeight:480  //初始化编辑器高度,默认320
96
97        //,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false
98
99        //,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况)
100
101        //启用自动保存
102        //,enableAutoSave: true
103        //自动保存间隔时间, 单位ms
104        //,saveInterval: 500
105
106        //,fullscreen : false //是否开启初始化时即全屏,默认关闭
107
108        //,imagePopup:true      //图片操作的浮层开关,默认打开
109
110        //,autoSyncData:true //自动同步编辑器要提交的数据
111        ,emotionLocalization:true //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
112
113        //粘贴只保留标签,去除标签所有属性
114        //,retainOnlyLabelPasted: false
115
116        //,pasteplain:false  //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
117        //纯文本粘贴模式下的过滤规则
118        //'filterTxtRules' : function(){
119        //    function transP(node){
120        //        node.tagName = 'p';
121        //        node.setStyle();
122        //    }
123        //    return {
124        //        //直接删除及其字节点内容
125        //        '-' : 'script style object iframe embed input select',
126        //        'p': {$:{}},
127        //        'br':{$:{}},
128        //        'div':{'$':{}},
129        //        'li':{'$':{}},
130        //        'caption':transP,
131        //        'th':transP,
132        //        'tr':transP,
133        //        'h1':transP,'h2':transP,'h3':transP,'h4':transP,'h5':transP,'h6':transP,
134        //        'td':function(node){
135        //            //没有内容的td直接删掉
136        //            var txt = !!node.innerText();
137        //            if(txt){
138        //                node.parentNode.insertAfter(UE.uNode.createText('    '),node);
139        //            }
140        //            node.parentNode.removeChild(node,node.innerText())
141        //        }
142        //    }
143        //}()
144
145        //,allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串
146
147        //insertorderedlist
148        //有序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
149        //,'insertorderedlist':{
150        //      //自定的样式
151        //        'num':'1,2,3...',
152        //        'num1':'1),2),3)...',
153        //        'num2':'(1),(2),(3)...',
154        //        'cn':'一,二,三....',
155        //        'cn1':'一),二),三)....',
156        //        'cn2':'(一),(二),(三)....',
157        //     //系统自带
158        //     'decimal' : '' ,         //'1,2,3...'
159        //     'lower-alpha' : '' ,    // 'a,b,c...'
160        //     'lower-roman' : '' ,    //'i,ii,iii...'
161        //     'upper-alpha' : '' , lang   //'A,B,C'
162        //     'upper-roman' : ''      //'I,II,III...'
163        //}
164
165        //insertunorderedlist
166        //无序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
167        //,insertunorderedlist : { //自定的样式
168        //    'dash' :'— 破折号', //-破折号
169        //    'dot':' 。 小圆圈', //系统自带
170        //    'circle' : '',  // '○ 小圆圈'
171        //    'disc' : '',    // '● 小圆点'
172        //    'square' : ''   //'■ 小方块'
173        //}
174        //,listDefaultPaddingLeft : '30'//默认的左边缩进的基数倍
175        ,listiconpath : URL+"themes/ueditor-list/"//自定义标号的路径
176        //,maxListLevel : 3 //限制可以tab的级数, 设置-1为不限制
177
178        //,autoTransWordToList:false  //禁止word中粘贴进来的列表自动变成列表标签
179
180        //fontfamily
181        //字体设置 label留空支持多语言自动切换,若配置,则以配置值为准
182        ,'fontfamily':[
183            { label:'',name:'songti',val:'宋体,SimSun'},
184			{ label:'',name:'NSimSun',val:'新宋体,NSimSun'},
185			{ label:'',name:'SimSun',val:'仿宋,SimSun'},
186			{ label:'',name:'FangSong_GB2312',val:'仿宋_GB2312,FangSong_GB2312'},
187            { label:'',name:'kaiti',val:'楷体,楷体_GB2312, SimKai'},
188            { label:'',name:'yahei',val:'微软雅黑,Microsoft YaHei'},
189            { label:'',name:'heiti',val:'黑体, SimHei'},
190            { label:'',name:'lishu',val:'隶书, SimLi'},
191            { label:'',name:'andaleMono',val:'andale mono'},
192            { label:'',name:'arial',val:'arial, helvetica,sans-serif'},
193            { label:'',name:'arialBlack',val:'arial black,avant garde'},
194            { label:'',name:'comicSansMs',val:'comic sans ms'},
195            { label:'',name:'impact',val:'impact,chicago'},
196            { label:'',name:'timesNewRoman',val:'times new roman'}
197        ]
198
199        //fontsize
200        //字号
201        //,'fontsize':[10, 11, 12, 14, 16, 18, 20, 24, 36]
202
203        //paragraph
204        //段落格式 值留空时支持多语言自动识别,若配置,则以配置值为准
205        //,'paragraph':{'p':'', 'h1':'', 'h2':'', 'h3':'', 'h4':'', 'h5':'', 'h6':''}
206
207        //rowspacing
208        //段间距 值和显示的名字相同
209        //,'rowspacing':['5', '10', '15', '20', '25']
210
211        //lineheight
212        //行内间距 值和显示的名字相同
213        //,'lineheight':['1', '1.5','1.75','2', '3', '4', '5']
214
215        //customstyle
216        //自定义样式,不支持国际化,此处配置值即可最后显示值
217        //block的元素是依据设置段落的逻辑设置的,inline的元素依据BIU的逻辑设置
218        //尽量使用一些常用的标签
219        //参数说明
220        //tag 使用的标签名字
221        //label 显示的名字也是用来标识不同类型的标识符,注意这个值每个要不同,
222        //style 添加的样式
223        //每一个对象就是一个自定义的样式
224        //,'customstyle':[
225        //    {tag:'h1', name:'tc', label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;'},
226        //    {tag:'h1', name:'tl',label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;margin:0 0 10px 0;'},
227        //    {tag:'span',name:'im', label:'', style:'font-style:italic;font-weight:bold'},
228        //    {tag:'span',name:'hi', label:'', style:'font-style:italic;font-weight:bold;color:rgb(51, 153, 204)'}
229        //]
230
231        //打开右键菜单功能
232        //,enableContextMenu: true
233        //右键菜单的内容,可以参考plugins/contextmenu.js里边的默认菜单的例子,label留空支持国际化,否则以此配置为准
234        //,contextMenu:[
235        //    {
236        //        label:'',       //显示的名称
237        //        cmdName:'selectall',//执行的command命令,当点击这个右键菜单时
238        //        //exec可选,有了exec就会在点击时执行这个function,优先级高于cmdName
239        //        exec:function () {
240        //            //this是当前编辑器的实例
241        //            //this.ui._dialogs['inserttableDialog'].open();
242        //        }
243        //    }
244        //]
245
246        //快捷菜单
247        //,shortcutMenu:["fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"]
248
249        //elementPathEnabled
250        //是否启用元素路径,默认是显示
251        //,elementPathEnabled : true
252
253        //wordCount
254        ,wordCount:true          //是否开启字数统计
255        //,maximumWords:10000       //允许的最大字符数
256        //字数统计提示,{#count}代表当前字数,{#leave}代表还可以输入多少字符数,留空支持多语言自动切换,否则按此配置显示
257        //,wordCountMsg:''   //当前已输入 {#count} 个字符,您还可以输入{#leave} 个字符
258        //超出字数限制提示  留空支持多语言自动切换,否则按此配置显示
259        //,wordOverFlowMsg:''    //<span style="color:red;">你输入的字符个数已经超出最大允许值,服务器可能会拒绝保存!</span>
260
261        //tab
262        //点击tab键时移动的距离,tabSize倍数,tabNode什么字符做为单位
263        //,tabSize:4
264        //,tabNode:'&nbsp;'
265
266        //removeFormat
267        //清除格式时可以删除的标签和属性
268        //removeForamtTags标签
269        //,removeFormatTags:'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var'
270        //removeFormatAttributes属性
271        //,removeFormatAttributes:'class,style,lang,width,height,align,hspace,valign'
272
273        //undo
274        //可以最多回退的次数,默认20
275        //,maxUndoCount:20
276        //当输入的字符数超过该值时,保存一次现场
277        //,maxInputCount:1
278
279        //autoHeightEnabled
280        // 是否自动长高,默认true
281        ,autoHeightEnabled:false
282
283        //scaleEnabled
284        //是否可以拉伸长高,默认true(当开启时,自动长高失效)
285        ,scaleEnabled:false
286        //,minFrameWidth:800    //编辑器拖动时最小宽度,默认800
287        ,minFrameHeight:500  //编辑器拖动时最小高度,默认220
288
289        //autoFloatEnabled
290        //是否保持toolbar的位置不动,默认true
291        //,autoFloatEnabled:true
292        //浮动时工具栏距离浏览器顶部的高度,用于某些具有固定头部的页面
293        //,topOffset:30
294        //编辑器底部距离工具栏高度(如果参数大于等于编辑器高度,则设置无效)
295        //,toolbarTopOffset:400
296
297        //设置远程图片是否抓取到本地保存
298        ,catchRemoteImageEnable: true //设置是否抓取远程图片
299        //pageBreakTag
300        //分页标识符,默认是_ueditor_page_break_tag_
301        //,pageBreakTag:'_page_break_tag_'
302		,catcherUrlPrefix:P8CONFIG.attachment_url
303
304        //autotypeset
305        //自动排版参数
306        //,autotypeset: {
307        //    mergeEmptyline: true,           //合并空行
308        //    removeClass: true,              //去掉冗余的class
309        //    removeEmptyline: false,         //去掉空行
310        //    removeSpace: false,             //去掉空格
311        //    textAlign:"left",               //段落的排版方式,可以是 left,right,center,justify 去掉这个属性表示不执行排版
312        //    imageBlockLine: 'center',       //图片的浮动方式,独占一行剧中,左右浮动,默认: center,left,right,none 去掉这个属性表示不执行排版
313        //    removeImageSize:false,          //清除图片尺寸
314        //    imageWidth: "",                 //图片的宽度
315        //    pasteFilter: false,             //根据规则过滤没事粘贴进来的内容
316        //    clearFontSize: false,           //去掉所有的内嵌字号,使用编辑器默认的字号
317        //    clearFontFamily: false,         //去掉所有的内嵌字体,使用编辑器默认的字体
318        //    defaultFontsize: "",            //默认字号
319        //    defaultFontFamily: "",          //默认字体
320        //    rowspacingtop: "",              //段前距
321        //    rowspacingbottom: "",           //段后距
322        //    lineheight:"",                  //行高
323        //    removeEmptyNode: false,         // 去掉空节点
324        //    //可以去掉的标签
325        //    removeTagNames: {标签名字:1},
326        //    indent: false,                  // 行首缩进
327        //    indentValue : '2em',            //行首缩进的大小
328        //    bdc2sb: false,
329        //    tobdc: false
330        //}
331
332        //tableDragable
333        //表格是否可以拖拽
334        //,tableDragable: true
335
336
337
338        //sourceEditor
339        //源码的查看方式,codemirror 是代码高亮,textarea是文本框,默认是codemirror
340        //注意默认codemirror只能在ie8+和非ie中使用
341        //,sourceEditor:"codemirror"
342        //如果sourceEditor是codemirror,还用配置一下两个参数
343        //codeMirrorJsUrl js加载的路径,默认是 URL + "third-party/codemirror/codemirror.js"
344        //,codeMirrorJsUrl:URL + "third-party/codemirror/codemirror.js"
345        //codeMirrorCssUrl css加载的路径,默认是 URL + "third-party/codemirror/codemirror.css"
346        //,codeMirrorCssUrl:URL + "third-party/codemirror/codemirror.css"
347        //编辑器初始化完成后是否进入源码模式,默认为否。
348        //,sourceEditorFirst:false
349
350        //iframeUrlMap
351        //dialog内容的路径 ~会被替换成URL,垓属性一旦打开,将覆盖所有的dialog的默认路径
352        //,iframeUrlMap:{
353        //    'anchor':'~/dialogs/anchor/anchor.html',
354        //}
355
356        //allowLinkProtocol 允许的链接地址,有这些前缀的链接地址不会自动添加http
357        //, allowLinkProtocols: ['http:', 'https:', '#', '/', 'ftp:', 'mailto:', 'tel:', 'git:', 'svn:']
358
359        //默认过滤规则相关配置项目
360        //,disabledTableInTable:true  //禁止表格嵌套
361        ,allowDivTransToP:false      //允许进入编辑器的div标签自动变成p标签
362        //,rgb2Hex:true               //默认产出的数据中的color自动从rgb格式变成16进制格式
363
364		// xss 过滤是否开启,inserthtml等操作
365		,xssFilterRules: true
366		//input xss过滤
367		,inputXssFilter: true
368		//output xss过滤
369		,outputXssFilter: true
370		// xss过滤白名单 名单来源: https://raw.githubusercontent.com/leizongmin/js-xss/master/lib/default.js
371		,whitList: {
372			a:      ['target', 'href', 'title', 'class', 'style','name'],
373			abbr:   ['title', 'class', 'style'],
374			address: ['class', 'style'],
375			area:   ['shape', 'coords', 'href', 'alt'],
376			article: [],
377			aside:  [],
378			audio:  ['autoplay', 'controls', 'loop', 'preload', 'src', 'class', 'style'],
379			b:      ['class', 'style'],
380			bdi:    ['dir'],
381			bdo:    ['dir'],
382			big:    [],
383			blockquote: ['cite', 'class', 'style'],
384			br:     [],
385			caption: ['class', 'style'],
386			center: [],
387			cite:   [],
388			code:   ['class', 'style'],
389			col:    ['align', 'valign', 'span', 'width', 'class', 'style'],
390			colgroup: ['align', 'valign', 'span', 'width', 'class', 'style'],
391			dd:     ['class', 'style'],
392			del:    ['datetime'],
393			details: ['open'],
394			div:    ['class', 'style'],
395			dl:     ['class', 'style'],
396			dt:     ['class', 'style'],
397			em:     ['class', 'style'],
398			font:   ['color', 'size', 'face'],
399			footer: [],
400			h1:     ['class', 'style'],
401			h2:     ['class', 'style'],
402			h3:     ['class', 'style'],
403			h4:     ['class', 'style'],
404			h5:     ['class', 'style'],
405			h6:     ['class', 'style'],
406			header: [],
407			hr:     ['class', 'noshade', 'size', 'style'],
408			i:      ['class', 'style'],
409			img:    ['src', 'alt', 'poster', 'title', 'width', 'height', 'id', '_src', '_url', 'loadingclass', 'class', 'data-latex', 'vspace', 'border' ,'anchorname','word_img', 'style'],
410			ins:    ['datetime'],
411			li:     ['class', 'style' , '_src'],
412			mark:   [],
413			nav:    [],
414			ol:     ['class', 'style'],
415			p:      ['class', 'style', 'data-background'],
416			pre:    ['class', 'style'],
417			s:      [],
418			section:['class', 'style'],
419			small:  [],
420			span:   ['class', 'style'],
421			sub:    ['class', 'style'],
422			sup:    ['class', 'style'],
423			strong: ['class', 'style'],
424			table:  ['width', 'border', 'align', 'valign', 'class', 'style'],
425			tbody:  ['align', 'valign', 'class', 'style'],
426			td:     ['width', 'rowspan', 'colspan', 'align', 'valign', 'class', 'style'],
427			tfoot:  ['align', 'valign', 'class', 'style'],
428			th:     ['width', 'rowspan', 'colspan', 'align', 'valign', 'class', 'style'],
429			thead:  ['align', 'valign', 'class', 'style'],
430			tr:     ['rowspan', 'align', 'valign', 'class', 'style'],
431			tt:     [],
432			u:      [],
433			ul:     ['class', 'style'],
434			video:  ['poster', 'autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style'],
435			embed:  ['type', 'class', 'width', 'height', 'allowscriptaccess', 'loop', 'play', 'menu', 'wmode', 'src', 'pluginspage', 'allowfullscreen'],
436			iframe: ['frameborder','border','style', 'marginwidth','marginheight','width','height','class','src','id']
437		}
438    };
439
440    function getUEBasePath(docUrl, confUrl) {
441
442        return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath());
443
444    }
445
446    function getConfigFilePath() {
447
448        var configPath = document.getElementsByTagName('script');
449
450        return configPath[ configPath.length - 1 ].src;
451
452    }
453
454    function getBasePath(docUrl, confUrl) {
455
456        var basePath = confUrl;
457
458
459        if (/^(\/|\\\\)/.test(confUrl)) {
460
461            basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/, '');
462
463        } else if (!/^[a-z]+:/i.test(confUrl)) {
464
465            docUrl = docUrl.split("#")[0].split("?")[0].replace(/[^\\\/]+$/, '');
466
467            basePath = docUrl + "" + confUrl;
468
469        }
470
471        return optimizationPath(basePath);
472
473    }
474
475    function optimizationPath(path) {
476
477        var protocol = /^[a-z]+:\/\//.exec(path)[ 0 ],
478            tmp = null,
479            res = [];
480
481        path = path.replace(protocol, "").split("?")[0].split("#")[0];
482
483        path = path.replace(/\\/g, '/').split(/\//);
484
485        path[ path.length - 1 ] = "";
486
487        while (path.length) {
488
489            if (( tmp = path.shift() ) === "..") {
490                res.pop();
491            } else if (tmp !== ".") {
492                res.push(tmp);
493            }
494
495        }
496
497        return protocol + res.join("/");
498
499    }
500
501    window.UE = {
502        getUEBasePath: getUEBasePath
503    };
504
505})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.