From 27ced9d90eb521316c4c7c5206e43567f2db2181 Mon Sep 17 00:00:00 2001 From: Matthew Scragg Date: Thu, 3 Oct 2013 20:19:33 -0500 Subject: [PATCH] js html sanitize, updated config, gravatar support, layout change --- app.py | 4 +- realms/__init__.py | 31 ++++++- realms/models.py | 3 + realms/static/css/style.css | 17 +++- realms/static/js/dillinger.js | 4 +- .../static/js/html-css-sanitizer-minified.js | 91 +++++++++++++++++++ realms/static/js/html-sanitizer-minified.js | 42 +++++++++ realms/templates/_new/index.html | 21 +++++ realms/templates/layout.html | 22 ++++- realms/templates/page/edit.html | 1 + realms/templates/page/page.html | 12 ++- realms/util.py | 7 +- 12 files changed, 234 insertions(+), 21 deletions(-) create mode 100644 realms/static/js/html-css-sanitizer-minified.js create mode 100644 realms/static/js/html-sanitizer-minified.js create mode 100644 realms/templates/_new/index.html diff --git a/app.py b/app.py index a8ee76d..180f510 100644 --- a/app.py +++ b/app.py @@ -1,8 +1,8 @@ from gevent import monkey, pywsgi monkey.patch_all() import logging -from realms import app +from realms import app, config if __name__ == '__main__': app.logger.setLevel(logging.INFO) - pywsgi.WSGIServer(('', 10000), app).serve_forever() + pywsgi.WSGIServer(('', config.port), app).serve_forever() diff --git a/realms/__init__.py b/realms/__init__.py index fe70e7f..d2864fb 100644 --- a/realms/__init__.py +++ b/realms/__init__.py @@ -11,10 +11,10 @@ from flask.ext.assets import Environment from recaptcha.client import captcha from werkzeug.routing import BaseConverter -import config from session import RedisSessionInterface +import config from wiki import Wiki -from util import to_canonical, remove_ext, mkdir_safe +from util import to_canonical, remove_ext, mkdir_safe, gravatar_url class RegexConverter(BaseConverter): @@ -61,6 +61,7 @@ from models import Site, User, CurrentUser def load_user(user_id): return CurrentUser(user_id) + w = Wiki(main_repo_dir) @@ -97,10 +98,28 @@ def root(): return render('home') #return redirect('/home') + @app.route("/account/") def account(): return render_template('account/index.html') + +@app.route("/_new/", methods=['GET', 'POST']) +def new_wiki(): + if request.method == 'POST': + # TODO validate wiki name + wiki_name = request.form['name'] + s = Site() + if s.get_by_name(wiki_name): + flash("Site already exists") + return redirect(redirect_url()) + else: + Wiki(repo_dir + "/" + wiki_name) + return redirect('http://%s.%s' % (wiki_name, config.hostname)) + else: + return render_template('_new/index.html') + + @app.route("/logout/") def logout(): logout_user() @@ -135,11 +154,13 @@ def register(): flash('Username is already taken') return redirect('/register') + email = request.form['email'].lower() # Create user and login - u = User.create(email=request.form['email'].lower(), + u = User.create(email=email, username=request.form['username'], - password=bcrypt.generate_password_hash(request.form['password'])) - login_user(u) + password=bcrypt.generate_password_hash(request.form['password']), + avatar=gravatar_url(email)) + login_user(CurrentUser(u.id)) return redirect("/") else: return render_template('account/register.html') diff --git a/realms/models.py b/realms/models.py index d65c32d..12ffa3c 100644 --- a/realms/models.py +++ b/realms/models.py @@ -36,6 +36,9 @@ class BaseModel(RethinkModel): class Site(BaseModel): table = 'sites' + def get_by_name(self, name): + return to_dict(self.get_one(name, 'name'), True) + class CurrentUser(): id = None diff --git a/realms/static/css/style.css b/realms/static/css/style.css index f333f55..e03ec87 100644 --- a/realms/static/css/style.css +++ b/realms/static/css/style.css @@ -1,8 +1,16 @@ body { - padding-top: 50px; + padding-top: 43px; background-color:#eee; } +.navbar { + min-height: inherit; +} +.navbar .container a { + padding-top: 10px; + padding-bottom: 10px; +} + #main-body { background-color: #fff; padding: 20px; @@ -11,6 +19,7 @@ body { border-radius: 0 0 6px 6px; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); box-shadow: 0 1px 2px rgba(0,0,0,.15); + padding-top: 10px; } .checkbox-cell { @@ -80,8 +89,8 @@ body { } .user-avatar a img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; -webkit-box-shadow: 0 1px 3px #1e1e1e; -moz-box-shadow: 0 1px 3px #1e1e1e; box-shadow: 0 1px 3px #1e1e1e; @@ -94,7 +103,7 @@ body { .navbar-nav .user-avatar a { - line-height: 30px; + } .navbar-nav>li.user-avatar a { diff --git a/realms/static/js/dillinger.js b/realms/static/js/dillinger.js index 1897abb..3664a59 100644 --- a/realms/static/js/dillinger.js +++ b/realms/static/js/dillinger.js @@ -532,11 +532,11 @@ $(function(){ function previewMd(){ var unmd = editor.getSession().getValue() - , md = converter(unmd) + , md = converter(unmd); $preview .html('') // unnecessary? - .html(md) + .html(html_sanitize(md)); refreshWordCount(); } diff --git a/realms/static/js/html-css-sanitizer-minified.js b/realms/static/js/html-css-sanitizer-minified.js new file mode 100644 index 0000000..81a9ac7 --- /dev/null +++ b/realms/static/js/html-css-sanitizer-minified.js @@ -0,0 +1,91 @@ +(function(){var c=void 0,m=!0,r=null,w=!1,H,K=["aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue,cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen,darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon,darkseagreen,darkslateblue,darkslategray,darkturquoise,darkviolet,deeppink,deepskyblue,dimgray,dodgerblue,firebrick,floralwhite,forestgreen,fuchsia,gainsboro,ghostwhite,gold,goldenrod,gray,green,greenyellow,honeydew,hotpink,indianred,indigo,ivory,khaki,lavender,lavenderblush,lawngreen,lemonchiffon,lightblue,lightcoral,lightcyan,lightgoldenrodyellow,lightgreen,lightgrey,lightpink,lightsalmon,lightseagreen,lightskyblue,lightslategray,lightsteelblue,lightyellow,lime,limegreen,linen,magenta,maroon,mediumaquamarine,mediumblue,mediumorchid,mediumpurple,mediumseagreen,mediumslateblue,mediumspringgreen,mediumturquoise,mediumvioletred,midnightblue,mintcream,mistyrose,moccasin,navajowhite,navy,oldlace,olive,olivedrab,orange,orangered,orchid,palegoldenrod,palegreen,paleturquoise,palevioletred,papayawhip,peachpuff,peru,pink,plum,powderblue,purple,red,rosybrown,royalblue,saddlebrown,salmon,sandybrown,seagreen,seashell,sienna,silver,skyblue,slateblue,slategray,snow,springgreen,steelblue,tan,teal,thistle,tomato,turquoise,violet,wheat,white,whitesmoke,yellow,yellowgreen".split(","), +"all-scroll,col-resize,crosshair,default,e-resize,hand,help,move,n-resize,ne-resize,no-drop,not-allowed,nw-resize,pointer,progress,row-resize,s-resize,se-resize,sw-resize,text,vertical-text,w-resize,wait".split(","),"armenian,decimal,decimal-leading-zero,disc,georgian,lower-alpha,lower-greek,lower-latin,lower-roman,square,upper-alpha,upper-latin,upper-roman".split(","),"100,200,300,400,500,600,700,800,900,bold,bolder,lighter".split(","),"block-level,inline-level,table-caption,table-cell,table-column,table-column-group,table-footer-group,table-header-group,table-row,table-row-group".split(","), +"condensed,expanded,extra-condensed,extra-expanded,narrower,semi-condensed,semi-expanded,ultra-condensed,ultra-expanded,wider".split(","),"inherit,inline,inline-block,inline-box,inline-flex,inline-grid,inline-list-item,inline-stack,inline-table,run-in".split(","),"behind,center-left,center-right,far-left,far-right,left-side,leftwards,right-side,rightwards".split(","),"large,larger,small,smaller,x-large,x-small,xx-large,xx-small".split(","),"dashed,dotted,double,groove,outset,ridge,solid".split(","), +"ease,ease-in,ease-in-out,ease-out,linear,step-end,step-start".split(","),"at,closest-corner,closest-side,ellipse,farthest-corner,farthest-side".split(","),"baseline,middle,sub,super,text-bottom,text-top".split(","),"caption,icon,menu,message-box,small-caption,status-bar".split(","),"fast,faster,slow,slower,x-fast,x-slow".split(","),["above","below","higher","level","lower"],["cursive","fantasy","monospace","sans-serif","serif"],["loud","silent","soft","x-loud","x-soft"],["no-repeat","repeat-x","repeat-y", +"round","space"],["blink","line-through","overline","underline"],["block","flex","grid","table"],["high","low","x-high","x-low"],["nowrap","pre","pre-line","pre-wrap"],["absolute","relative","static"],["alternate","alternate-reverse","reverse"],["border-box","content-box","padding-box"],["capitalize","lowercase","uppercase"],["child","female","male"],["=","opacity"],["backwards","forwards"],["bidi-override","embed"],["bottom","top"],["break-all","keep-all"],["clip","ellipsis"],["contain","cover"], +["continuous","digits"],["end","start"],["flat","preserve-3d"],["hide","show"],["inside","outside"],["italic","oblique"],["left","right"],["ltr","rtl"],["no-content","no-display"],["paused","running"],["suppress","unrestricted"],["thick","thin"],[","],["/"],["all"],["always"],["auto"],["avoid"],["both"],["break-word"],["center"],["circle"],["code"],["collapse"],["contents"],["fixed"],["hidden"],["infinite"],["inset"],["invert"],["justify"],["list-item"],["local"],["medium"],["mix"],["none"],["normal"], +["once"],["repeat"],["scroll"],["separate"],["small-caps"],["spell-out"],["to"],["transparent"],["visible"]],T={animation:{cssPropBits:517,cssLitGroup:[K[10],K[24],K[29],K[44],K[47],K[53],K[62],K[70],K[71]],cssFns:["cubic-bezier()","steps()"]},"animation-delay":{cssPropBits:5,cssLitGroup:[K[47]],cssFns:[]},"animation-direction":{cssPropBits:0,cssLitGroup:[K[24],K[47],K[71]],cssFns:[]},"animation-duration":"animation-delay","animation-fill-mode":{cssPropBits:0,cssLitGroup:[K[29],K[47],K[53],K[70]], +cssFns:[]},"animation-iteration-count":{cssPropBits:5,cssLitGroup:[K[47],K[62]],cssFns:[]},"animation-name":{cssPropBits:512,cssLitGroup:[K[47],K[70]],cssFns:[]},"animation-play-state":{cssPropBits:0,cssLitGroup:[K[44],K[47]],cssFns:[]},"animation-timing-function":{cssPropBits:0,cssLitGroup:[K[10],K[47]],cssFns:["cubic-bezier()","steps()"]},azimuth:{cssPropBits:5,cssLitGroup:[K[7],K[41],K[55]],cssFns:[]},"backface-visibility":{cssPropBits:0,cssLitGroup:[K[58],K[61],K[80]],cssFns:[]},background:{cssPropBits:23, +cssLitGroup:[K[0],K[18],K[25],K[31],K[34],K[41],K[47],K[48],K[51],K[55],K[60],K[67],K[70],K[73],K[74],K[79]],cssFns:"image(),linear-gradient(),radial-gradient(),repeating-linear-gradient(),repeating-radial-gradient(),rgb(),rgba()".split(",")},"background-attachment":{cssPropBits:0,cssLitGroup:[K[47],K[60],K[67],K[74]],cssFns:[]},"background-color":{cssPropBits:258,cssLitGroup:[K[0],K[79]],cssFns:["rgb()","rgba()"]},"background-image":{cssPropBits:16,cssLitGroup:[K[47],K[70]],cssFns:["image()","linear-gradient()", +"radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"background-position":{cssPropBits:5,cssLitGroup:[K[31],K[41],K[47],K[55]],cssFns:[]},"background-repeat":{cssPropBits:0,cssLitGroup:[K[18],K[47],K[73]],cssFns:[]},border:{cssPropBits:7,cssLitGroup:[K[0],K[9],K[46],K[61],K[63],K[68],K[70],K[79]],cssFns:["rgb()","rgba()"]},"border-bottom":"border","border-bottom-color":{cssPropBits:2,cssLitGroup:[K[0],K[79]],cssFns:["rgb()","rgba()"]},"border-bottom-left-radius":{cssPropBits:5, +cssFns:[]},"border-bottom-right-radius":"border-bottom-left-radius","border-bottom-style":{cssPropBits:0,cssLitGroup:[K[9],K[61],K[63],K[70]],cssFns:[]},"border-bottom-width":{cssPropBits:5,cssLitGroup:[K[46],K[68]],cssFns:[]},"border-collapse":{cssPropBits:0,cssLitGroup:[K[58],K[75]],cssFns:[]},"border-color":"border-bottom-color","border-left":"border","border-left-color":"border-bottom-color","border-left-style":"border-bottom-style","border-left-width":"border-bottom-width","border-radius":{cssPropBits:5, +cssLitGroup:[K[48]],cssFns:[]},"border-right":"border","border-right-color":"border-bottom-color","border-right-style":"border-bottom-style","border-right-width":"border-bottom-width","border-spacing":"border-bottom-left-radius","border-style":"border-bottom-style","border-top":"border","border-top-color":"border-bottom-color","border-top-left-radius":"border-bottom-left-radius","border-top-right-radius":"border-bottom-left-radius","border-top-style":"border-bottom-style","border-top-width":"border-bottom-width", +"border-width":"border-bottom-width",bottom:{cssPropBits:5,cssLitGroup:[K[51]],cssFns:[]},box:{cssPropBits:0,cssLitGroup:[K[59],K[70],K[71]],cssFns:[]},"box-shadow":{cssPropBits:7,cssLitGroup:[K[0],K[47],K[63],K[70]],cssFns:["rgb()","rgba()"]},"box-sizing":{cssPropBits:0,cssLitGroup:[K[25]],cssFns:[]},"caption-side":{cssPropBits:0,cssLitGroup:[K[31]],cssFns:[]},clear:{cssPropBits:0,cssLitGroup:[K[41],K[53],K[70]],cssFns:[]},clip:{cssPropBits:0,cssLitGroup:[K[51]],cssFns:["rect()"]},color:{cssPropBits:258, +cssLitGroup:[K[0]],cssFns:["rgb()","rgba()"]},content:{cssPropBits:8,cssLitGroup:[K[70],K[71]],cssFns:[]},cue:{cssPropBits:16,cssLitGroup:[K[70]],cssFns:[]},"cue-after":"cue","cue-before":"cue",cursor:{cssPropBits:272,cssLitGroup:[K[1],K[47],K[51]],cssFns:[]},direction:{cssPropBits:0,cssLitGroup:[K[42]],cssFns:[]},display:{cssPropBits:32,cssLitGroup:[K[4],K[6],K[20],K[51],K[66],K[70]],cssFns:[]},"display-extras":{cssPropBits:0,cssLitGroup:[K[66],K[70]],cssFns:[]},"display-inside":{cssPropBits:0,cssLitGroup:[K[20], +K[51]],cssFns:[]},"display-outside":{cssPropBits:0,cssLitGroup:[K[4],K[70]],cssFns:[]},elevation:{cssPropBits:5,cssLitGroup:[K[15]],cssFns:[]},"empty-cells":{cssPropBits:0,cssLitGroup:[K[38]],cssFns:[]},filter:{cssPropBits:32,cssFns:["alpha()"]},"float":{cssPropBits:32,cssLitGroup:[K[41],K[70]],cssFns:[]},font:{cssPropBits:73,cssLitGroup:[K[3],K[8],K[13],K[16],K[40],K[47],K[48],K[68],K[71],K[76]],cssFns:[]},"font-family":{cssPropBits:72,cssLitGroup:[K[16],K[47]],cssFns:[]},"font-size":{cssPropBits:1, +cssLitGroup:[K[8],K[68]],cssFns:[]},"font-stretch":{cssPropBits:0,cssLitGroup:[K[5],K[71]],cssFns:[]},"font-style":{cssPropBits:0,cssLitGroup:[K[40],K[71]],cssFns:[]},"font-variant":{cssPropBits:0,cssLitGroup:[K[71],K[76]],cssFns:[]},"font-weight":{cssPropBits:0,cssLitGroup:[K[3],K[71]],cssFns:[]},height:{cssPropBits:37,cssLitGroup:[K[51]],cssFns:[]},left:"height","letter-spacing":{cssPropBits:5,cssLitGroup:[K[71]],cssFns:[]},"line-height":{cssPropBits:1,cssLitGroup:[K[71]],cssFns:[]},"list-style":{cssPropBits:16, +cssLitGroup:[K[2],K[39],K[56],K[70]],cssFns:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"list-style-image":{cssPropBits:16,cssLitGroup:[K[70]],cssFns:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"list-style-position":{cssPropBits:0,cssLitGroup:[K[39]],cssFns:[]},"list-style-type":{cssPropBits:0,cssLitGroup:[K[2],K[56],K[70]],cssFns:[]},margin:"bottom","margin-bottom":"bottom", +"margin-left":"bottom","margin-right":"bottom","margin-top":"bottom","max-height":{cssPropBits:1,cssLitGroup:[K[51],K[70]],cssFns:[]},"max-width":"max-height","min-height":{cssPropBits:1,cssLitGroup:[K[51]],cssFns:[]},"min-width":"min-height",opacity:{cssPropBits:33,cssFns:[]},outline:{cssPropBits:7,cssLitGroup:[K[0],K[9],K[46],K[61],K[63],K[64],K[68],K[70]],cssFns:["rgb()","rgba()"]},"outline-color":{cssPropBits:2,cssLitGroup:[K[0],K[64]],cssFns:["rgb()","rgba()"]},"outline-style":"border-bottom-style", +"outline-width":"border-bottom-width",overflow:{cssPropBits:32,cssLitGroup:[K[51],K[61],K[74],K[80]],cssFns:[]},"overflow-wrap":{cssPropBits:0,cssLitGroup:[K[54],K[71]],cssFns:[]},"overflow-x":{cssPropBits:0,cssLitGroup:[K[43],K[51],K[61],K[74],K[80]],cssFns:[]},"overflow-y":"overflow-x",padding:{cssPropBits:1,cssFns:[]},"padding-bottom":"opacity","padding-left":"opacity","padding-right":"opacity","padding-top":"opacity","page-break-after":{cssPropBits:0,cssLitGroup:[K[41],K[50],K[51],K[52]],cssFns:[]}, +"page-break-before":"page-break-after","page-break-inside":{cssPropBits:0,cssLitGroup:[K[51],K[52]],cssFns:[]},pause:"border-bottom-left-radius","pause-after":"border-bottom-left-radius","pause-before":"border-bottom-left-radius",perspective:{cssPropBits:5,cssLitGroup:[K[70]],cssFns:[]},"perspective-origin":{cssPropBits:5,cssLitGroup:[K[31],K[41],K[55]],cssFns:[]},pitch:{cssPropBits:5,cssLitGroup:[K[21],K[68]],cssFns:[]},"pitch-range":"border-bottom-left-radius","play-during":{cssPropBits:16,cssLitGroup:[K[51], +K[69],K[70],K[73]],cssFns:[]},position:{cssPropBits:32,cssLitGroup:[K[23]],cssFns:[]},quotes:{cssPropBits:8,cssLitGroup:[K[70]],cssFns:[]},richness:"border-bottom-left-radius",right:"height",speak:{cssPropBits:0,cssLitGroup:[K[70],K[71],K[77]],cssFns:[]},"speak-header":{cssPropBits:0,cssLitGroup:[K[50],K[72]],cssFns:[]},"speak-numeral":{cssPropBits:0,cssLitGroup:[K[35]],cssFns:[]},"speak-punctuation":{cssPropBits:0,cssLitGroup:[K[57],K[70]],cssFns:[]},"speech-rate":{cssPropBits:5,cssLitGroup:[K[14], +K[68]],cssFns:[]},stress:"border-bottom-left-radius","table-layout":{cssPropBits:0,cssLitGroup:[K[51],K[60]],cssFns:[]},"text-align":{cssPropBits:0,cssLitGroup:[K[41],K[55],K[65]],cssFns:[]},"text-decoration":{cssPropBits:0,cssLitGroup:[K[19],K[70]],cssFns:[]},"text-indent":"border-bottom-left-radius","text-overflow":{cssPropBits:0,cssLitGroup:[K[33]],cssFns:[]},"text-shadow":"box-shadow","text-transform":{cssPropBits:0,cssLitGroup:[K[26],K[70]],cssFns:[]},"text-wrap":{cssPropBits:0,cssLitGroup:[K[45], +K[70],K[71]],cssFns:[]},top:"height",transform:{cssPropBits:0,cssLitGroup:[K[70]],cssFns:"matrix(),perspective(),rotate(),rotate3d(),rotatex(),rotatey(),rotatez(),scale(),scale3d(),scalex(),scaley(),scalez(),skew(),skewx(),skewy(),translate(),translate3d(),translatex(),translatey(),translatez()".split(",")},"transform-origin":"perspective-origin","transform-style":{cssPropBits:0,cssLitGroup:[K[37]],cssFns:[]},transition:{cssPropBits:1029,cssLitGroup:[K[10],K[47],K[49],K[70]],cssFns:["cubic-bezier()", +"steps()"]},"transition-delay":"animation-delay","transition-duration":"animation-delay","transition-property":{cssPropBits:1024,cssLitGroup:[K[47],K[49]],cssFns:[]},"transition-timing-function":"animation-timing-function","unicode-bidi":{cssPropBits:0,cssLitGroup:[K[30],K[71]],cssFns:[]},"vertical-align":{cssPropBits:5,cssLitGroup:[K[12],K[31]],cssFns:[]},visibility:{cssPropBits:32,cssLitGroup:[K[58],K[61],K[80]],cssFns:[]},"voice-family":{cssPropBits:8,cssLitGroup:[K[27],K[47]],cssFns:[]},volume:{cssPropBits:1, +cssLitGroup:[K[17],K[68]],cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[K[22],K[71]],cssFns:[]},width:{cssPropBits:33,cssLitGroup:[K[51]],cssFns:[]},"word-break":{cssPropBits:0,cssLitGroup:[K[32],K[71]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[K[36],K[47]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[K[0],K[47]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7, +cssLitGroup:[K[0],K[31],K[41],K[47],K[78]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[K[0],K[11],K[31],K[41],K[47],K[55],K[56]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[K[47]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[K[47],K[51]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[K[28]],cssFns:[]},"matrix()":"animation-delay", +"perspective()":"border-bottom-left-radius","rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius", +"translate()":"animation-delay","translate3d()":"animation-delay","translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},X;for(X in T)"string"===typeof T[X]&&Object.hasOwnProperty.call(T,X)&&(T[X]=T[T[X]]);H=T;"undefined"!==typeof window&&(window.cssSchema=H);var aa,ba; +(function(){function g(b){var d=parseInt(b.substring(1),16);return 65535>10),56320+(d&1023))):d==d?String.fromCharCode(d):" ">b[1]?"":b[1]}function N(b,d){return'"'+b.replace(/[\u0000-\u001f\\\"<>]/g,d)+'"'}function O(b){return G[b]||(G[b]="\\"+b.charCodeAt(0).toString(16)+" ")}function A(b){return f[b]||(f[b]=("\u0010">b?"%0":"%")+b.charCodeAt(0).toString(16))}var G={"\\":"\\\\"},f={"\\":"%5c"},j=RegExp("\\uFEFF|U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?|url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]|(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]|(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*|\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?|<\!--|--\>|[\\t\\n\\f ]+|/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)|[~|^$*]=|[^\"'\\\\/]|/(?![/*])","gi"), +d=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),b=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");ba=function(b){return b.replace(d,g)};aa=function(d){for(var d=(""+d).replace(/\r\n?/g,"\n").match(j)||[],g=0,e=" ",a=0,L=d.length;a"==l||"<\!--"==l||"\ufeff"==l||32>= +U?" ":/url\(/i.test(l)?"url("+N(l.replace(b,""),A)+")":l;if(e!=l||" "!=l)d[g++]=e=l}d.length=g;return d}})();"undefined"!==typeof window&&(window.lexCss=aa,window.decodeCss=ba);var ca=function(){function g(a){a=(""+a).match(I);return!a?r:new f(j(a[1]),j(a[2]),j(a[3]),j(a[4]),j(a[5]),j(a[6]),j(a[7]))}function N(a,b){return"string"==typeof a?encodeURI(a).replace(b,O):r}function O(a){a=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(a>>4&15)+"0123456789ABCDEF".charAt(a&15)}function A(a){if(a===r)return r;for(var a=a.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/"),b=d,l;(l=a.replace(b,"$1"))!=a;a=l);return a}function G(a,d){var l=a.U(),p=d.L();p?l.ka(d.j):p=d.Z(); +p?l.ha(d.n):p=d.$();p?l.ia(d.k):p=d.ba();var g=d.g,e=A(g);if(p)l.ga(d.X()),e=e&&e.replace(b,"");else if(p=!!g){if(47!==e.charCodeAt(0))var e=A(l.g||"").replace(b,""),h=e.lastIndexOf("/")+1,e=A((h?e.substring(0,h):"")+A(g)).replace(b,"")}else e=e&&e.replace(b,""),e!==g&&l.G(e);p?l.G(e):p=d.ca();p?l.P(d.l):p=d.aa();p&&l.ja(d.o);return l}function f(a,b,d,e,g,h,I){this.j=a;this.n=b;this.k=d;this.h=e;this.g=g;this.l=h;this.o=I}function j(a){return"string"==typeof a&&0]/g,j={"\n":"%0a","\u000c":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"}, +d=/^(?:([^:/?# ]+):)?/,b=/^(?:https?|mailto)$/i;fa=function(){var a={};return function l(b,d,e,h,I){var b=G(b),f=H[b];if(!f||"object"!==typeof f)d.length=0;else{for(var o=f.cssPropBits,n=o&80,k=o&1536,s=NaN,B=0,x=0;B=y)i=o&1?i:"";else if(V=i.charCodeAt(1),D=i.charCodeAt(2),R=48<=V&&57>=V,j=48<=D&&57>=D,43===y&&(R||46===V&&j))i=o&1?(R?"":"0")+i.substring(1):"";else if(45===y&&(R||46===V&&j))i=o&4?(R?"-":"-0")+i.substring(1):o&1?"0":"";else if(46===y&&R)i=o&1?"0"+i:"";else if('url("'===i.substring(0,5))i=e&&o&16?g(A(O(h,d[B].substring(5,i.length-2)), +b,e)):"";else if("("===i.charAt(i.length-1))a:{z=d;F=B;i=1;v=F+1;for(y=z.length;v"]=e["+"]=e["~"]=e;ga=function(a,b,d){function g(p,k){function i(d,e,g){var i,l,f,W,t,J=m;i="";if(de&&" "===d[f-1]&&--f;h.startAtrule&&h.startAtrule(d[a].toLowerCase(),d.slice(e,f));b="{"===d[b]?N(d,b,g,h):b+1;h.endAtrule&&h.endAtrule()}return b}function N(d,b,f,h){++b;for(h.startBlock&&h.startBlock();ba)return a=~a,a===e?a+1:a;var j=d[a];if("{"!==j)return a===e?a+1:a;b=a+1;a>e&&" "===d[a-1]&&--a;for(h.startRuleset&&h.startRuleset(d.slice(e,a));ba)a=~a;else{for(var L=[],l=0,p=b;p])/g;e=a+"";if(da)e=e.split(W);else{for(var f=[],h=0,i;(i=W.exec(e))!==r;)f.push(e.substring(h,i.index)),f.push(i[0]),h=i.index+i[0].length;f.push(e.substring(h));e=f}b(d,e,0,{r:w,C:w},g)}}function d(a,d,g,e,q){return function(){b(a,d,g,e,q)}}function b(a,b,e,f,q){try{a.H&&0==e&&a.H(q);for(var E, +u,S,l=b.length;e"===b[e+1])e+=2,S=E[1].toLowerCase(),a.t&&a.t(S,q,v,d(a,b,e,f,q));else{var n=b,p=e,o=a,s=q,x=v,z=f,A=h(n,p);A?(o.t&&o.t(A.name,s,x,d(o,n,p,z,s)),e=A.next):e=n.length}else a.e&&a.e("</",q,v,d(a,b,e,f,q));break;case "<":if(E=/^([-\w:]+)\s*\/?/.exec(j))if(E[0].length===j.length&& +">"===b[e+1]){e+=2;S=E[1].toLowerCase();a.w&&a.w(S,[],q,v,d(a,b,e,f,q));var B=g.f[S];B&F&&(e=I(b,{name:S,next:e,c:B},a,q,v,f))}else{var n=b,p=a,o=q,s=v,x=f,y=h(n,e);y?(p.w&&p.w(y.name,y.S,o,s,d(p,n,y.next,x,o)),e=y.c&F?I(n,y,p,o,s,x):y.next):e=n.length}else a.e&&a.e("<",q,v,d(a,b,e,f,q));break;case "<\!--":if(!f.C){for(u=e+1;u"===b[u]&&/--$/.test(b[u-1]));u++);if(u"!==b[u];u++);u"!==b[u];u++);u":a.e&&a.e(">",q,v,d(a,b,e,f,q));break;case "":break;default:a.e&&a.e(k,q,v,d(a,b,e,f,q))}}a.B&&a.B(q)}catch(D){if(D!==v)throw D;}}function I(a,b,e,h,q,i){var u=a.length;P.hasOwnProperty(b.name)|| +(P[b.name]=RegExp("^"+b.name+"(?:[\\s\\/]|$)","i"));for(var S=P[b.name],l=b.next,j=b.next+1;j"!==a[h];h++)f+=a[h];if(!(u<=h)){for(var i=[];""!== +f;)if(d=z.exec(f))if(d[4]&&!d[5]||d[6]&&!d[7]){for(var d=d[4]||d[6],j=w,f=[f,a[h++]];h"===a[h])break}else 0<=a[h].indexOf(d)&&(j=m);f.push(a[h])}if(u<=h)break;f=f.join("")}else{var j=d[1].toLowerCase(),l;if(d[2]){l=d[3];var k=l.charCodeAt(0);if(34===k||39===k)l=l.substr(1,l.length-2);l=A(l.replace(B,""))}else l="";i.push(j,l);f=f.substr(d[0].length)}else f=f.replace(/^[\s\S][^a-z\s]*/,"");e.S=i;e.next=h+1;return e}}function e(a){function b(a,d){e||d.push(a)}var d,e;return j({startDoc:function(){d= +[];e=w},startTag:function(b,f,h){if(!e&&g.f.hasOwnProperty(b)){var i=g.f[b];if(!(i&g.c.FOLDABLE)){var l=a(b,f);if(l){if("object"!==typeof l)throw Error("tagPolicy did not return object (old API?)");if("attribs"in l)f=l.attribs;else throw Error("tagPolicy gave no attribs");var j;"tagName"in l?(j=l.tagName,l=g.f[j]):(j=b,l=i);if(i&g.c.OPTIONAL_ENDTAG){var t=d[d.length-1];t&&t.D===b&&(t.v!==j||b!==j)&&h.push("")}i&g.c.EMPTY||d.push({D:b,v:j});h.push("<",j);b=0;for(t=f.length;b");i&g.c.EMPTY&&!(l&g.c.EMPTY)&&h.push("")}else e=!(i&g.c.EMPTY)}}},endTag:function(a,b){if(e)e=w;else if(g.f.hasOwnProperty(a)){var f=g.f[a];if(!(f&(g.c.EMPTY|g.c.FOLDABLE))){if(f&g.c.OPTIONAL_ENDTAG)for(f=d.length;0<=--f;){var h=d[f].D;if(h===a)break;if(!(g.f[h]&g.c.OPTIONAL_ENDTAG))return}else for(f=d.length;0<=--f&&d[f].D!==a;);if(!(0>f)){for(h=d.length;--h>f;){var i=d[h].v;g.f[i]&g.c.OPTIONAL_ENDTAG||b.push("")}f< +d.length&&(a=d[f].v);d.length=f;b.push("")}}}},pcdata:b,rcdata:b,cdata:b,endDoc:function(a){for(;d.length;d.length--)a.push("")}})}function a(a,b,d,e,f){if(!f)return r;try{var g=ca.parse(""+a);if(g&&(!g.L()||ea.test(g.Y()))){var h=f(g,b,d,e);return h?h.toString():r}}catch(i){}return r}function L(a,b,d,e,f){d||a(b+" removed",{T:"removed",tagName:b});if(e!==f){var g="changed";e&&!f?g="removed":!e&&f&&(g="added");a(b+"."+d+" "+g,{T:g,tagName:b,pa:d,oldValue:e,newValue:f})}} +function l(a,b,d){b=b+"::"+d;if(a.hasOwnProperty(b))return a[b];b="*::"+d;if(a.hasOwnProperty(b))return a[b]}function p(b,d,e,f,h){for(var i=0;i",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:"\u00a0"},o=/^#(\d+)$/,n=/^#x([0-9A-Fa-f]+)$/,k=/^[A-Za-z][A-za-z0-9]+$/,s="undefined"!==typeof window&& +window.document?window.document.createElement("textarea"):r,B=/\0/g,x=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,i=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,y=/&/g,V=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,D=/[<]/g,R=/>/g,na=/\"/g,z=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,da=3==="a,b".split(/(,)/).length,F=g.c.CDATA|g.c.RCDATA,v={},P={},ea=/^(?:https?|mailto)$/i,C={};C.sa=C.escapeAttrib=G;C.ua=C.makeHtmlSanitizer=e;C.va=C.makeSaxParser=j;C.wa=C.makeTagPolicy= +U;C.za=C.normalizeRCData=f;C.Aa=C.sanitize=function(a,b,d,e){return Q(a,U(b,d,e))};C.Ba=C.sanitizeAttribs=p;C.Ca=C.sanitizeWithPolicy=Q;C.Ea=C.unescapeEntities=A;return C}($),oa=ma.sanitize;"undefined"!==typeof window&&(window.html=ma,window.html_sanitize=oa);})(); diff --git a/realms/static/js/html-sanitizer-minified.js b/realms/static/js/html-sanitizer-minified.js new file mode 100644 index 0000000..848f314 --- /dev/null +++ b/realms/static/js/html-sanitizer-minified.js @@ -0,0 +1,42 @@ +(function(){var l=null,p=function(){function e(a){a=(""+a).match(E);return!a?l:new b(q(a[1]),q(a[2]),q(a[3]),q(a[4]),q(a[5]),q(a[6]),q(a[7]))}function z(a,e){return"string"==typeof a?encodeURI(a).replace(e,B):l}function B(a){a=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(a>>4&15)+"0123456789ABCDEF".charAt(a&15)}function y(a){if(a===l)return l;for(var a=a.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/"),e=m,b;(b=a.replace(e,"$1"))!=a;a=b);return a}function A(a,e){var b=a.R(),g=e.K();g?b.fa(e.j): +g=e.V();g?b.ca(e.m):g=e.W();g?b.da(e.k):g=e.Y();var m=e.g,k=y(m);if(g)b.ba(e.T()),k=k&&k.replace(x,"");else if(g=!!m){if(47!==k.charCodeAt(0))var k=y(b.g||"").replace(x,""),s=k.lastIndexOf("/")+1,k=y((s?k.substring(0,s):"")+y(m)).replace(x,"")}else k=k&&k.replace(x,""),k!==m&&b.G(k);g?b.G(k):g=e.Z();g?b.M(e.l):g=e.X();g&&b.ea(e.n);return b}function b(a,e,b,g,m,k,s){this.j=a;this.m=e;this.k=b;this.h=g;this.g=m;this.l=k;this.n=s}function q(a){return"string"==typeof a&&0])/g;c=f+"";if(Y)c=c.split(b);else{for(var i=[],h=0,n;(n=b.exec(c))!==l;)i.push(c.substring(h,n.index)),i.push(n[0]),h=n.index+n[0].length;i.push(c.substring(h));c=i}x(a,c,0,{o:!1,C:!1},e)}}function m(f,a,d,e,c){return function(){x(f,a,d,e,c)}}function x(f,a,d,j,c){try{f.H&&0==d&&f.H(c);for(var b, +i,h,n=a.length;d"===a[d+1])d+=2,h=b[1].toLowerCase(),f.r&&f.r(h,c,t,m(f,a,d,j,c));else{var g=a,o=d,q=f,s=c,v=t,y=j,x=D(g,o);x?(q.r&&q.r(x.name,s,v,m(q,g,o,y,s)),d=x.next):d=g.length}else f.d&&f.d("</",c,t,m(f,a,d,j,c));break;case "<":if(b=/^([-\w:]+)\s*\/?/.exec(k))if(b[0].length===k.length&& +">"===a[d+1]){d+=2;h=b[1].toLowerCase();f.v&&f.v(h,[],c,t,m(f,a,d,j,c));var z=e.f[h];z&O&&(d=E(a,{name:h,next:d,c:z},f,c,t,j))}else{var g=a,o=f,q=c,s=t,v=j,C=D(g,d);C?(o.v&&o.v(C.name,C.P,q,s,m(o,g,C.next,v,q)),d=C.c&O?E(g,C,o,q,s,v):C.next):d=g.length}else f.d&&f.d("<",c,t,m(f,a,d,j,c));break;case "<\!--":if(!j.C){for(i=d+1;i"===a[i]&&/--$/.test(a[i-1]));i++);if(i"!==a[i];i++);i"!==a[i];i++);i":f.d&&f.d(">",c,t,m(f,a,d,j,c));break;case "":break;default:f.d&&f.d(r,c,t,m(f,a,d,j,c))}}f.B&&f.B(c)}catch(B){if(B!==t)throw B;}}function E(a,w,d,j,c,u){var i=a.length;I.hasOwnProperty(w.name)|| +(I[w.name]=RegExp("^"+w.name+"(?:[\\s\\/]|$)","i"));for(var h=I[w.name],n=w.next,r=w.next+1;r"!==a[u];u++)c+=a[u];if(!(i<=u)){for(var h=[];""!== +c;)if(d=$.exec(c))if(d[4]&&!d[5]||d[6]&&!d[7]){for(var d=d[4]||d[6],n=!1,c=[c,a[u++]];u"===a[u])break}else 0<=a[u].indexOf(d)&&(n=!0);c.push(a[u])}if(i<=u)break;c=c.join("")}else{var n=d[1].toLowerCase(),r;if(d[2]){r=d[3];var g=r.charCodeAt(0);if(34===g||39===g)r=r.substr(1,r.length-2);r=y(r.replace(aa,""))}else r="";h.push(n,r);c=c.substr(d[0].length)}else c=c.replace(/^[\s\S][^a-z\s]*/,"");j.P=h;j.next=u+1;return j}}function F(a){function b(a,f){j||f.push(a)}var d,j;return q({startDoc:function(){d= +[];j=!1},startTag:function(c,b,i){if(!j&&e.f.hasOwnProperty(c)){var h=e.f[c];if(!(h&e.c.FOLDABLE)){var n=a(c,b);if(n){if("object"!==typeof n)throw Error("tagPolicy did not return object (old API?)");if("attribs"in n)b=n.attribs;else throw Error("tagPolicy gave no attribs");var g;"tagName"in n?(g=n.tagName,n=e.f[g]):(g=c,n=h);if(h&e.c.OPTIONAL_ENDTAG){var k=d[d.length-1];k&&k.D===c&&(k.t!==g||c!==g)&&i.push("")}h&e.c.EMPTY||d.push({D:c,t:g});i.push("<",g);c=0;for(k=b.length;c");h&e.c.EMPTY&&!(n&e.c.EMPTY)&&i.push("")}else j=!(h&e.c.EMPTY)}}},endTag:function(a,f){if(j)j=!1;else if(e.f.hasOwnProperty(a)){var b=e.f[a];if(!(b&(e.c.EMPTY|e.c.FOLDABLE))){if(b&e.c.OPTIONAL_ENDTAG)for(b=d.length;0<=--b;){var h=d[b].D;if(h===a)break;if(!(e.f[h]&e.c.OPTIONAL_ENDTAG))return}else for(b=d.length;0<=--b&&d[b].D!==a;);if(!(0>b)){for(h=d.length;--h>b;){var g=d[h].t;e.f[g]&e.c.OPTIONAL_ENDTAG||f.push("")}b")}}}},pcdata:b,rcdata:b,cdata:b,endDoc:function(a){for(;d.length;d.length--)a.push("")}})}function a(a,b,d,e,c){if(!c)return l;try{var g=p.parse(""+a);if(g&&(!g.K()||ba.test(g.U()))){var i=c(g,b,d,e);return i?i.toString():l}}catch(h){}return l}function v(a,b,d,e,c){d||a(b+" removed",{Q:"removed",tagName:b});if(e!==c){var g="changed";e&&!c?g="removed":!e&&c&&(g="added");a(b+"."+d+" "+g,{Q:g,tagName:b,ia:d,oldValue:e,newValue:c})}} +function J(a,b,d){b=b+"::"+d;if(a.hasOwnProperty(b))return a[b];b="*::"+d;if(a.hasOwnProperty(b))return a[b]}function g(b,g,d,j,c){for(var k=0;k",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:"\u00a0"},R=/^#(\d+)$/,S=/^#x([0-9A-Fa-f]+)$/,T=/^[A-Za-z][A-za-z0-9]+$/,H="undefined"!== +typeof window&&window.document?window.document.createElement("textarea"):l,aa=/\0/g,U=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,Z=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,V=/&/g,X=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,M=/[<]/g,N=/>/g,W=/\"/g,$=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Y=3==="a,b".split(/(,)/).length,O=e.c.CDATA|e.c.RCDATA,t={},I={},ba=/^(?:https?|mailto)$/i,o={};o.ka=o.escapeAttrib=A;o.la=o.makeHtmlSanitizer=F;o.ma=o.makeSaxParser= +q;o.na=o.makeTagPolicy=K;o.pa=o.normalizeRCData=b;o.qa=o.sanitize=function(a,b,d,e){return k(a,K(b,d,e))};o.ra=o.sanitizeAttribs=g;o.sa=o.sanitizeWithPolicy=k;o.ta=o.unescapeEntities=y;return o}(L),ca=Q.sanitize;"undefined"!==typeof window&&(window.html=Q,window.html_sanitize=ca);})(); diff --git a/realms/templates/_new/index.html b/realms/templates/_new/index.html new file mode 100644 index 0000000..429756f --- /dev/null +++ b/realms/templates/_new/index.html @@ -0,0 +1,21 @@ +{% extends 'layout.html' %} +{% block body %} +

Create New Site

+
+
+
+
+ +
+ + .realms.io +
+
+ + +
+
+
+ + +{% endblock %} \ No newline at end of file diff --git a/realms/templates/layout.html b/realms/templates/layout.html index ab87034..315650e 100644 --- a/realms/templates/layout.html +++ b/realms/templates/layout.html @@ -36,12 +36,26 @@