mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Merge pull request #1030 from ayvis/master-br-patch
replaced BR with br in js
This commit is contained in:
commit
7a433db2f1
@ -220,16 +220,16 @@ dp.sh.Highlighter.prototype.AddBit = function(str, css)
|
||||
|
||||
for(var i = 0; i < lines.length; i++)
|
||||
{
|
||||
span = document.createElement('SPAN');
|
||||
span = document.createElement('span');
|
||||
span.className = css;
|
||||
span.innerHTML = lines[i];
|
||||
|
||||
this.div.appendChild(span);
|
||||
|
||||
// don't add a <BR> for the last line
|
||||
// don't add a <br /> for the last line
|
||||
if(i + 1 < lines.length)
|
||||
{
|
||||
this.div.appendChild(document.createElement('BR'));
|
||||
this.div.appendChild(document.createElement('br'));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -340,7 +340,7 @@ dp.sh.Highlighter.prototype.ProcessSmartTabs = function(code)
|
||||
dp.sh.Highlighter.prototype.SwitchToTable = function()
|
||||
{
|
||||
// Safari fix: for some reason lowercase <br /> isn't getting picked up, even though 'i' is set
|
||||
var lines = this.div.innerHTML.split(/<BR>/gi);
|
||||
var lines = this.div.innerHTML.split(/<br \/>/gi);
|
||||
var row = null;
|
||||
var cell = null;
|
||||
var html = '';
|
||||
|
||||
@ -236,7 +236,7 @@ dp.sh.Highlighter.prototype.AddBit = function(str, css)
|
||||
if(str == null || str.length == 0)
|
||||
return;
|
||||
|
||||
var span = this.CreateElement('SPAN');
|
||||
var span = this.CreateElement('span');
|
||||
|
||||
str = str.replace(/&/g, '&');
|
||||
str = str.replace(/ /g, ' ');
|
||||
@ -257,15 +257,15 @@ dp.sh.Highlighter.prototype.AddBit = function(str, css)
|
||||
|
||||
for(var i = 0; i < lines.length; i++)
|
||||
{
|
||||
span = this.CreateElement('SPAN');
|
||||
span = this.CreateElement('span');
|
||||
span.className = css;
|
||||
span.innerHTML = lines[i];
|
||||
|
||||
this.div.appendChild(span);
|
||||
|
||||
// don't add a <BR> for the last line
|
||||
// don't add a <br /> for the last line
|
||||
if(i + 1 < lines.length)
|
||||
this.div.appendChild(this.CreateElement('BR'));
|
||||
this.div.appendChild(this.CreateElement('br'));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -120,12 +120,12 @@ var Builder = {
|
||||
dump: function(scope) {
|
||||
if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
|
||||
|
||||
var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
|
||||
"BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
|
||||
"FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
|
||||
"KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
|
||||
"PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
|
||||
"TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
|
||||
var tags = ("a abbr acronym address applet area b base basefont bdo big blockquote body " +
|
||||
"br button caption center cite code col colgroup dd del dfn dir div dl dt em fieldset " +
|
||||
"font form frame frameset h1 h2 h3 h4 h5 h6 head hr html i iframe img input ins isindex "+
|
||||
"kbd label legend li link map menu meta noframes noscript object ol optgroup option p "+
|
||||
"param pre q s samp script select small span strike strong style sub sup table tbody td "+
|
||||
"textarea tfoot th thead title tr tt u ul var").split(/\s+/);
|
||||
|
||||
tags.each( function(tag){
|
||||
scope[tag] = function() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user