Major revamps to the template parser. Fixed a few security holes that could allow PHP to be injected in untimely places in TPL code. Improved Ux for XSS attempt in tplWikiFormat. Documented many functions. Backported much cleaner parser from 2.0 branch. Beautified a lot of code in the depths of the template class. Pretty much a small-scale Extreme Makeover.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="face-embarassed.svg"
sodipodi:docbase="/home/dan/emotes"
inkscape:version="0.45"
sodipodi:version="0.32"
id="svg4376"
height="48px"
width="48px"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
sodipodi:modified="true">
<defs
id="defs3">
<linearGradient
id="linearGradient5125"
inkscape:collect="always">
<stop
id="stop5127"
offset="0"
style="stop-color:#729fcf;stop-opacity:1;" />
<stop
id="stop5129"
offset="1"
style="stop-color:#729fcf;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5125"
id="linearGradient1394"
gradientUnits="userSpaceOnUse"
x1="29.807129"
y1="13.022821"
x2="29.807129"
y2="8.1614628"
gradientTransform="translate(0.6954057,5.597891)" />
<linearGradient
id="linearGradient2729"
inkscape:collect="always">
<stop
id="stop2731"
offset="0"
style="stop-color:#d6e0f8;stop-opacity:1;" />
<stop
id="stop2733"
offset="1"
style="stop-color:#d6e0f8;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2729"
id="linearGradient1391"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-5.3150023,5.774668)"
x1="36.592773"
y1="18.228588"
x2="35.032169"
y2="13.809171" />
<linearGradient
id="linearGradient2102">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop2104" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop2106" />
</linearGradient>
<linearGradient
id="linearGradient3068">
<stop
style="stop-color:#cccccc;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop3070" />
<stop
id="stop3076"
offset="0.34579438"
style="stop-color:#ffffff;stop-opacity:1.0000000;" />
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.72486681"
id="stop3078" />
<stop
style="stop-color:#cecece;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop3072" />
</linearGradient>
<linearGradient
id="linearGradient8156">
<stop
style="stop-color:#ac0000;stop-opacity:0.62127662;"
offset="0"
id="stop8158" />
<stop
style="stop-color:#ac0000;stop-opacity:0;"
offset="1"
id="stop8160" />
</linearGradient>
<linearGradient
id="linearGradient3290">
<stop
id="stop3292"
offset="0.0000000"
style="stop-color:#fffcde;stop-opacity:1.0000000;" />
<stop
style="stop-color:#f6e76a;stop-opacity:1.0000000;"
offset="0.64485979"
id="stop3294" />
<stop
id="stop3296"
offset="1.0000000"
style="stop-color:#ffb738;stop-opacity:1.0000000;" />
</linearGradient>
<radialGradient
r="8.9020796"
fy="15.755712"
fx="29.158466"
cy="15.720984"
cx="29.288071"
gradientUnits="userSpaceOnUse"
id="radialGradient2714"
xlink:href="#linearGradient3290"
inkscape:collect="always" />
<linearGradient
id="linearGradient2509">
<stop
style="stop-color:#fffbd5;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop2511" />
<stop
style="stop-color:#edd400;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop2513" />
</linearGradient>
<radialGradient
gradientTransform="matrix(1.25,0,0,1.2206272,-7.11902,-8.367206)"
id="aigrd2"
cx="25.0527"
cy="39.5928"
r="15.7572"
fx="25.0527"
fy="39.5928"
gradientUnits="userSpaceOnUse">
<stop
offset="0.0000000"
style="stop-color:#777777;stop-opacity:1.0000000;"
id="stop8602" />
<stop
offset="1"
style="stop-color:#000000"
id="stop8604" />
</radialGradient>
<linearGradient
id="linearGradient4565"
inkscape:collect="always">
<stop
id="stop4567"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
id="stop4569"
offset="1"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3824">
<stop
id="stop3826"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop3828"
offset="1.0000000"
style="stop-color:#c9c9c9;stop-opacity:1.0000000;" />
</linearGradient>
<linearGradient
id="linearGradient3800">
<stop
id="stop3802"
offset="0.0000000"
style="stop-color:#ffeed6;stop-opacity:1.0000000;" />
<stop
style="stop-color:#e49c2f;stop-opacity:1.0000000;"
offset="0.50000000"
id="stop8664" />
<stop
id="stop3804"
offset="1.0000000"
style="stop-color:#ffc66c;stop-opacity:1.0000000;" />
</linearGradient>
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.000000,0.000000,0.000000,0.333333,0.000000,25.71429)"
r="19.714285"
fy="38.571430"
fx="24.714285"
cy="38.571430"
cx="24.714285"
id="radialGradient4571"
xlink:href="#linearGradient4565"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8156"
id="radialGradient8164"
cx="15.153078"
cy="28.062902"
fx="15.153078"
fy="28.062902"
r="5.0579581"
gradientTransform="matrix(1,0,0,1.3196488,0,-8.9702732)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8156"
id="radialGradient8170"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,1.3196488,0,-8.9702732)"
cx="15.153078"
cy="28.062902"
fx="15.153078"
fy="28.062902"
r="5.0579581" />
</defs>
<sodipodi:namedview
inkscape:window-y="0"
inkscape:window-x="192"
inkscape:window-height="735"
inkscape:window-width="822"
inkscape:showpageshadow="false"
inkscape:document-units="px"
inkscape:grid-bbox="true"
showgrid="false"
inkscape:current-layer="layer1"
inkscape:cy="23.205326"
inkscape:cx="25.411306"
inkscape:zoom="7.9999997"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="0.19607843"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
fill="#edd400" />
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Face - Happy</dc:title>
<dc:subject>
<rdf:Bag>
<rdf:li>emoticon</rdf:li>
<rdf:li>emote</rdf:li>
<rdf:li>smiley</rdf:li>
<rdf:li>happy</rdf:li>
<rdf:li>:)</rdf:li>
<rdf:li>:-)</rdf:li>
</rdf:Bag>
</dc:subject>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:source>http://jimmac.musichall.cz</dc:source>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
<cc:permits
rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits
rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Notice" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Attribution" />
<cc:permits
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<cc:requires
rdf:resource="http://web.resource.org/cc/ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
inkscape:label="Layer 1"
id="layer1">
<path
d="M 44.428570 38.571430 A 19.714285 6.5714288 0 1 1 5.0000000,38.571430 A 19.714285 6.5714288 0 1 1 44.428570 38.571430 z"
sodipodi:ry="6.5714288"
sodipodi:rx="19.714285"
sodipodi:cy="38.571430"
sodipodi:cx="24.714285"
id="path4563"
style="opacity:0.53164557;color:#000000;fill:url(#radialGradient4571);fill-opacity:1.0;fill-rule:evenodd;stroke:none;stroke-width:0.40487173;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
sodipodi:type="arc" />
<path
transform="matrix(2.083142,0.000000,0.000000,2.083142,-40.54715,-16.49224)"
d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z"
sodipodi:ry="8.6620579"
sodipodi:rx="8.6620579"
sodipodi:cy="19.008621"
sodipodi:cx="31.112698"
id="path4320"
style="overflow:visible;display:inline;visibility:visible;stroke-opacity:1.0000000;stroke-dashoffset:0.0000000;stroke-dasharray:none;stroke-miterlimit:4.0000000;marker-end:none;marker-mid:none;marker-start:none;marker:none;stroke-linejoin:round;stroke-linecap:round;stroke-width:0.48004404;stroke:#9c8c0a;fill-rule:evenodd;fill-opacity:1.0000000;fill:url(#radialGradient2714);color:#000000;opacity:1.0000000"
sodipodi:type="arc" />
<path
sodipodi:type="arc"
style="fill:url(#radialGradient8164);fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path7181"
sodipodi:cx="15.153078"
sodipodi:cy="28.062902"
sodipodi:rx="4.8079581"
sodipodi:ry="6.4247284"
d="M 19.961036 28.062902 A 4.8079581 6.4247284 0 1 1 10.34512,28.062902 A 4.8079581 6.4247284 0 1 1 19.961036 28.062902 z"
transform="translate(1.3689692,-1.2295478)" />
<path
transform="matrix(1.979782,0,0,1.979782,-37.364426,-14.556923)"
sodipodi:type="arc"
style="opacity:0.67721522;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50510627;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
id="path4322"
sodipodi:cx="31.112698"
sodipodi:cy="19.008621"
sodipodi:rx="8.6620579"
sodipodi:ry="8.6620579"
d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.45064,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z" />
<path
sodipodi:type="arc"
style="fill:url(#radialGradient8170);fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path8168"
sodipodi:cx="15.153078"
sodipodi:cy="28.062902"
sodipodi:rx="4.8079581"
sodipodi:ry="6.4247284"
d="M 19.961036 28.062902 A 4.8079581 6.4247284 0 1 1 10.34512,28.062902 A 4.8079581 6.4247284 0 1 1 19.961036 28.062902 z"
transform="translate(15.957913,-1.2761064)" />
<path
style="fill:url(#aigrd2);fill-rule:nonzero;stroke:none;stroke-miterlimit:4"
d="M 33.374694,34.580329 C 29.65112,30.416317 27.812285,28.949048 23.822918,28.949048 C 19.921739,28.949048 17.323246,30.637094 14.447918,34.933883 C 17.881215,32.58507 19.75755,31.284387 23.557753,31.284387 C 27.269592,31.284387 29.30883,32.335086 33.374694,34.580329 z "
id="path8606"
sodipodi:nodetypes="czczc" />
<path
id="path2296"
d="M 21.695405,14.472891 L 15.570405,19.222891 L 15.945405,15.972891 L 21.695405,14.472891 z "
style="opacity:0.43670882;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<path
style="opacity:0.43670882;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 27.070405,14.472891 L 33.195405,19.222891 L 32.820405,15.972891 L 27.070405,14.472891 z "
id="path2298" />
<path
sodipodi:nodetypes="czsscc"
id="path2739"
d="M 27.202952,14.516704 C 27.202952,14.516704 28.867633,22.158589 29.260924,24.01383 C 29.741939,26.282883 33.87042,27.771512 33.801258,25.43646 C 33.706998,22.25401 30.885588,22.404526 30.602167,21.694824 C 29.384367,18.645695 33.294455,19.209745 33.294455,19.209745 C 33.294455,19.209745 27.202952,14.516704 27.202952,14.516704 z "
style="opacity:1;color:#000000;fill:url(#linearGradient1394);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<path
sodipodi:nodetypes="cszsc"
id="path2743"
d="M 28.272569,17.712222 C 28.272569,17.712222 29.293949,22.467664 29.686782,23.590047 C 29.996141,24.473931 30.425993,25.245851 31.763909,25.136843 C 32.882191,25.045729 32.710512,23.456917 31.277773,22.66197 C 28.910039,21.348246 28.272569,17.800611 28.272569,17.712222 z "
style="opacity:1;color:#000000;fill:url(#linearGradient1391);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<path
sodipodi:type="arc"
style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
id="path2741"
sodipodi:cx="14.4375"
sodipodi:cy="24.4375"
sodipodi:rx="1.1875"
sodipodi:ry="1.1875"
d="M 15.625 24.4375 A 1.1875 1.1875 0 1 1 13.25,24.4375 A 1.1875 1.1875 0 1 1 15.625 24.4375 z"
transform="matrix(0.553405,0,0,0.553405,23.525285,9.8319504)" />
</g>
</svg>