Showing preview only (1,310K chars total). Download the full file or copy to clipboard to get everything.
Repository: anantgarg/Qwench
Branch: master
Commit: e44f916d738b
Files: 387
Total size: 1.2 MB
Directory structure:
gitextract_dpbewjre/
├── .buildpath
├── .htaccess
├── .project
├── .settings/
│ └── org.eclipse.php.core.prefs
├── LICENSE.TXT
├── README.TXT
├── TODO.TXT
├── VERSION.TXT
├── config.default.php
├── controllers/
│ ├── answers.php
│ ├── comments.php
│ ├── helpers.php
│ ├── questions.php
│ ├── tags.php
│ └── users.php
├── css/
│ ├── main.css
│ ├── prettify.css
│ ├── tagscomplete.css
│ └── wmd.css
├── db/
│ ├── 1.txt
│ ├── 2.txt
│ └── 3.txt
├── index.php
├── install.php
├── js/
│ ├── fancyalert.js
│ ├── jquery.js
│ ├── prettify/
│ │ ├── lang-css.js
│ │ ├── lang-hs.js
│ │ ├── lang-lisp.js
│ │ ├── lang-lua.js
│ │ ├── lang-ml.js
│ │ ├── lang-proto.js
│ │ ├── lang-sql.js
│ │ ├── lang-vb.js
│ │ ├── lang-wiki.js
│ │ └── prettify.js
│ ├── showdown.js
│ ├── tagscomplete.js
│ └── wmd.js
├── libraries/
│ ├── helper.class.php
│ ├── markdown.php
│ ├── pagination.class.php
│ ├── purifier/
│ │ ├── HTMLPurifier/
│ │ │ ├── AttrCollections.php
│ │ │ ├── AttrDef/
│ │ │ │ ├── CSS/
│ │ │ │ │ ├── AlphaValue.php
│ │ │ │ │ ├── Background.php
│ │ │ │ │ ├── BackgroundPosition.php
│ │ │ │ │ ├── Border.php
│ │ │ │ │ ├── Color.php
│ │ │ │ │ ├── Composite.php
│ │ │ │ │ ├── DenyElementDecorator.php
│ │ │ │ │ ├── Filter.php
│ │ │ │ │ ├── Font.php
│ │ │ │ │ ├── FontFamily.php
│ │ │ │ │ ├── ImportantDecorator.php
│ │ │ │ │ ├── Length.php
│ │ │ │ │ ├── ListStyle.php
│ │ │ │ │ ├── Multiple.php
│ │ │ │ │ ├── Number.php
│ │ │ │ │ ├── Percentage.php
│ │ │ │ │ ├── TextDecoration.php
│ │ │ │ │ └── URI.php
│ │ │ │ ├── CSS.php
│ │ │ │ ├── Enum.php
│ │ │ │ ├── HTML/
│ │ │ │ │ ├── Bool.php
│ │ │ │ │ ├── Class.php
│ │ │ │ │ ├── Color.php
│ │ │ │ │ ├── FrameTarget.php
│ │ │ │ │ ├── ID.php
│ │ │ │ │ ├── Length.php
│ │ │ │ │ ├── LinkTypes.php
│ │ │ │ │ ├── MultiLength.php
│ │ │ │ │ ├── Nmtokens.php
│ │ │ │ │ └── Pixels.php
│ │ │ │ ├── Integer.php
│ │ │ │ ├── Lang.php
│ │ │ │ ├── Switch.php
│ │ │ │ ├── Text.php
│ │ │ │ ├── URI/
│ │ │ │ │ ├── Email/
│ │ │ │ │ │ └── SimpleCheck.php
│ │ │ │ │ ├── Email.php
│ │ │ │ │ ├── Host.php
│ │ │ │ │ ├── IPv4.php
│ │ │ │ │ └── IPv6.php
│ │ │ │ └── URI.php
│ │ │ ├── AttrDef.php
│ │ │ ├── AttrTransform/
│ │ │ │ ├── Background.php
│ │ │ │ ├── BdoDir.php
│ │ │ │ ├── BgColor.php
│ │ │ │ ├── BoolToCSS.php
│ │ │ │ ├── Border.php
│ │ │ │ ├── EnumToCSS.php
│ │ │ │ ├── ImgRequired.php
│ │ │ │ ├── ImgSpace.php
│ │ │ │ ├── Input.php
│ │ │ │ ├── Lang.php
│ │ │ │ ├── Length.php
│ │ │ │ ├── Name.php
│ │ │ │ ├── NameSync.php
│ │ │ │ ├── SafeEmbed.php
│ │ │ │ ├── SafeObject.php
│ │ │ │ ├── SafeParam.php
│ │ │ │ ├── ScriptRequired.php
│ │ │ │ └── Textarea.php
│ │ │ ├── AttrTransform.php
│ │ │ ├── AttrTypes.php
│ │ │ ├── AttrValidator.php
│ │ │ ├── Bootstrap.php
│ │ │ ├── CSSDefinition.php
│ │ │ ├── ChildDef/
│ │ │ │ ├── Chameleon.php
│ │ │ │ ├── Custom.php
│ │ │ │ ├── Empty.php
│ │ │ │ ├── Optional.php
│ │ │ │ ├── Required.php
│ │ │ │ ├── StrictBlockquote.php
│ │ │ │ └── Table.php
│ │ │ ├── ChildDef.php
│ │ │ ├── Config.php
│ │ │ ├── ConfigSchema/
│ │ │ │ ├── Builder/
│ │ │ │ │ ├── ConfigSchema.php
│ │ │ │ │ └── Xml.php
│ │ │ │ ├── Exception.php
│ │ │ │ ├── Interchange/
│ │ │ │ │ ├── Directive.php
│ │ │ │ │ └── Id.php
│ │ │ │ ├── Interchange.php
│ │ │ │ ├── InterchangeBuilder.php
│ │ │ │ ├── Validator.php
│ │ │ │ ├── ValidatorAtom.php
│ │ │ │ ├── schema/
│ │ │ │ │ ├── Attr.AllowedClasses.txt
│ │ │ │ │ ├── Attr.AllowedFrameTargets.txt
│ │ │ │ │ ├── Attr.AllowedRel.txt
│ │ │ │ │ ├── Attr.AllowedRev.txt
│ │ │ │ │ ├── Attr.ClassUseCDATA.txt
│ │ │ │ │ ├── Attr.DefaultImageAlt.txt
│ │ │ │ │ ├── Attr.DefaultInvalidImage.txt
│ │ │ │ │ ├── Attr.DefaultInvalidImageAlt.txt
│ │ │ │ │ ├── Attr.DefaultTextDir.txt
│ │ │ │ │ ├── Attr.EnableID.txt
│ │ │ │ │ ├── Attr.ForbiddenClasses.txt
│ │ │ │ │ ├── Attr.IDBlacklist.txt
│ │ │ │ │ ├── Attr.IDBlacklistRegexp.txt
│ │ │ │ │ ├── Attr.IDPrefix.txt
│ │ │ │ │ ├── Attr.IDPrefixLocal.txt
│ │ │ │ │ ├── AutoFormat.AutoParagraph.txt
│ │ │ │ │ ├── AutoFormat.Custom.txt
│ │ │ │ │ ├── AutoFormat.DisplayLinkURI.txt
│ │ │ │ │ ├── AutoFormat.Linkify.txt
│ │ │ │ │ ├── AutoFormat.PurifierLinkify.DocURL.txt
│ │ │ │ │ ├── AutoFormat.PurifierLinkify.txt
│ │ │ │ │ ├── AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt
│ │ │ │ │ ├── AutoFormat.RemoveEmpty.RemoveNbsp.txt
│ │ │ │ │ ├── AutoFormat.RemoveEmpty.txt
│ │ │ │ │ ├── CSS.AllowImportant.txt
│ │ │ │ │ ├── CSS.AllowTricky.txt
│ │ │ │ │ ├── CSS.AllowedProperties.txt
│ │ │ │ │ ├── CSS.DefinitionRev.txt
│ │ │ │ │ ├── CSS.MaxImgLength.txt
│ │ │ │ │ ├── CSS.Proprietary.txt
│ │ │ │ │ ├── Cache.DefinitionImpl.txt
│ │ │ │ │ ├── Cache.SerializerPath.txt
│ │ │ │ │ ├── Core.AggressivelyFixLt.txt
│ │ │ │ │ ├── Core.CollectErrors.txt
│ │ │ │ │ ├── Core.ColorKeywords.txt
│ │ │ │ │ ├── Core.ConvertDocumentToFragment.txt
│ │ │ │ │ ├── Core.DirectLexLineNumberSyncInterval.txt
│ │ │ │ │ ├── Core.Encoding.txt
│ │ │ │ │ ├── Core.EscapeInvalidChildren.txt
│ │ │ │ │ ├── Core.EscapeInvalidTags.txt
│ │ │ │ │ ├── Core.EscapeNonASCIICharacters.txt
│ │ │ │ │ ├── Core.HiddenElements.txt
│ │ │ │ │ ├── Core.Language.txt
│ │ │ │ │ ├── Core.LexerImpl.txt
│ │ │ │ │ ├── Core.MaintainLineNumbers.txt
│ │ │ │ │ ├── Core.RemoveInvalidImg.txt
│ │ │ │ │ ├── Core.RemoveScriptContents.txt
│ │ │ │ │ ├── Filter.Custom.txt
│ │ │ │ │ ├── Filter.ExtractStyleBlocks.Escaping.txt
│ │ │ │ │ ├── Filter.ExtractStyleBlocks.Scope.txt
│ │ │ │ │ ├── Filter.ExtractStyleBlocks.TidyImpl.txt
│ │ │ │ │ ├── Filter.ExtractStyleBlocks.txt
│ │ │ │ │ ├── Filter.YouTube.txt
│ │ │ │ │ ├── HTML.Allowed.txt
│ │ │ │ │ ├── HTML.AllowedAttributes.txt
│ │ │ │ │ ├── HTML.AllowedElements.txt
│ │ │ │ │ ├── HTML.AllowedModules.txt
│ │ │ │ │ ├── HTML.Attr.Name.UseCDATA.txt
│ │ │ │ │ ├── HTML.BlockWrapper.txt
│ │ │ │ │ ├── HTML.CoreModules.txt
│ │ │ │ │ ├── HTML.CustomDoctype.txt
│ │ │ │ │ ├── HTML.DefinitionID.txt
│ │ │ │ │ ├── HTML.DefinitionRev.txt
│ │ │ │ │ ├── HTML.Doctype.txt
│ │ │ │ │ ├── HTML.ForbiddenAttributes.txt
│ │ │ │ │ ├── HTML.ForbiddenElements.txt
│ │ │ │ │ ├── HTML.MaxImgLength.txt
│ │ │ │ │ ├── HTML.Parent.txt
│ │ │ │ │ ├── HTML.Proprietary.txt
│ │ │ │ │ ├── HTML.SafeEmbed.txt
│ │ │ │ │ ├── HTML.SafeObject.txt
│ │ │ │ │ ├── HTML.Strict.txt
│ │ │ │ │ ├── HTML.TidyAdd.txt
│ │ │ │ │ ├── HTML.TidyLevel.txt
│ │ │ │ │ ├── HTML.TidyRemove.txt
│ │ │ │ │ ├── HTML.Trusted.txt
│ │ │ │ │ ├── HTML.XHTML.txt
│ │ │ │ │ ├── Output.CommentScriptContents.txt
│ │ │ │ │ ├── Output.Newline.txt
│ │ │ │ │ ├── Output.SortAttr.txt
│ │ │ │ │ ├── Output.TidyFormat.txt
│ │ │ │ │ ├── Test.ForceNoIconv.txt
│ │ │ │ │ ├── URI.AllowedSchemes.txt
│ │ │ │ │ ├── URI.Base.txt
│ │ │ │ │ ├── URI.DefaultScheme.txt
│ │ │ │ │ ├── URI.DefinitionID.txt
│ │ │ │ │ ├── URI.DefinitionRev.txt
│ │ │ │ │ ├── URI.Disable.txt
│ │ │ │ │ ├── URI.DisableExternal.txt
│ │ │ │ │ ├── URI.DisableExternalResources.txt
│ │ │ │ │ ├── URI.DisableResources.txt
│ │ │ │ │ ├── URI.Host.txt
│ │ │ │ │ ├── URI.HostBlacklist.txt
│ │ │ │ │ ├── URI.MakeAbsolute.txt
│ │ │ │ │ ├── URI.Munge.txt
│ │ │ │ │ ├── URI.MungeResources.txt
│ │ │ │ │ ├── URI.MungeSecretKey.txt
│ │ │ │ │ ├── URI.OverrideAllowedSchemes.txt
│ │ │ │ │ └── info.ini
│ │ │ │ └── schema.ser
│ │ │ ├── ConfigSchema.php
│ │ │ ├── ContentSets.php
│ │ │ ├── Context.php
│ │ │ ├── Definition.php
│ │ │ ├── DefinitionCache/
│ │ │ │ ├── Decorator/
│ │ │ │ │ ├── Cleanup.php
│ │ │ │ │ ├── Memory.php
│ │ │ │ │ └── Template.php.in
│ │ │ │ ├── Decorator.php
│ │ │ │ ├── Null.php
│ │ │ │ ├── Serializer/
│ │ │ │ │ ├── HTML/
│ │ │ │ │ │ └── 4.0.0,ddc9b993d7fc8d4a185e8dbf5b9a0996,1.ser
│ │ │ │ │ ├── README
│ │ │ │ │ └── URI/
│ │ │ │ │ └── 4.0.0,05c766101e813c246917b022f97b5e6e,1.ser
│ │ │ │ └── Serializer.php
│ │ │ ├── DefinitionCache.php
│ │ │ ├── DefinitionCacheFactory.php
│ │ │ ├── Doctype.php
│ │ │ ├── DoctypeRegistry.php
│ │ │ ├── ElementDef.php
│ │ │ ├── Encoder.php
│ │ │ ├── EntityLookup/
│ │ │ │ └── entities.ser
│ │ │ ├── EntityLookup.php
│ │ │ ├── EntityParser.php
│ │ │ ├── ErrorCollector.php
│ │ │ ├── ErrorStruct.php
│ │ │ ├── Exception.php
│ │ │ ├── Filter/
│ │ │ │ ├── ExtractStyleBlocks.php
│ │ │ │ └── YouTube.php
│ │ │ ├── Filter.php
│ │ │ ├── Generator.php
│ │ │ ├── HTMLDefinition.php
│ │ │ ├── HTMLModule/
│ │ │ │ ├── Bdo.php
│ │ │ │ ├── CommonAttributes.php
│ │ │ │ ├── Edit.php
│ │ │ │ ├── Forms.php
│ │ │ │ ├── Hypertext.php
│ │ │ │ ├── Image.php
│ │ │ │ ├── Legacy.php
│ │ │ │ ├── List.php
│ │ │ │ ├── Name.php
│ │ │ │ ├── NonXMLCommonAttributes.php
│ │ │ │ ├── Object.php
│ │ │ │ ├── Presentation.php
│ │ │ │ ├── Proprietary.php
│ │ │ │ ├── Ruby.php
│ │ │ │ ├── SafeEmbed.php
│ │ │ │ ├── SafeObject.php
│ │ │ │ ├── Scripting.php
│ │ │ │ ├── StyleAttribute.php
│ │ │ │ ├── Tables.php
│ │ │ │ ├── Target.php
│ │ │ │ ├── Text.php
│ │ │ │ ├── Tidy/
│ │ │ │ │ ├── Name.php
│ │ │ │ │ ├── Proprietary.php
│ │ │ │ │ ├── Strict.php
│ │ │ │ │ ├── Transitional.php
│ │ │ │ │ ├── XHTML.php
│ │ │ │ │ └── XHTMLAndHTML4.php
│ │ │ │ ├── Tidy.php
│ │ │ │ └── XMLCommonAttributes.php
│ │ │ ├── HTMLModule.php
│ │ │ ├── HTMLModuleManager.php
│ │ │ ├── IDAccumulator.php
│ │ │ ├── Injector/
│ │ │ │ ├── AutoParagraph.php
│ │ │ │ ├── DisplayLinkURI.php
│ │ │ │ ├── Linkify.php
│ │ │ │ ├── PurifierLinkify.php
│ │ │ │ ├── RemoveEmpty.php
│ │ │ │ └── SafeObject.php
│ │ │ ├── Injector.php
│ │ │ ├── Language/
│ │ │ │ ├── classes/
│ │ │ │ │ └── en-x-test.php
│ │ │ │ └── messages/
│ │ │ │ ├── en-x-test.php
│ │ │ │ ├── en-x-testmini.php
│ │ │ │ └── en.php
│ │ │ ├── Language.php
│ │ │ ├── LanguageFactory.php
│ │ │ ├── Length.php
│ │ │ ├── Lexer/
│ │ │ │ ├── DOMLex.php
│ │ │ │ ├── DirectLex.php
│ │ │ │ ├── PEARSax3.php
│ │ │ │ └── PH5P.php
│ │ │ ├── Lexer.php
│ │ │ ├── PercentEncoder.php
│ │ │ ├── Printer/
│ │ │ │ ├── CSSDefinition.php
│ │ │ │ ├── ConfigForm.css
│ │ │ │ ├── ConfigForm.js
│ │ │ │ ├── ConfigForm.php
│ │ │ │ └── HTMLDefinition.php
│ │ │ ├── Printer.php
│ │ │ ├── PropertyList.php
│ │ │ ├── PropertyListIterator.php
│ │ │ ├── Strategy/
│ │ │ │ ├── Composite.php
│ │ │ │ ├── Core.php
│ │ │ │ ├── FixNesting.php
│ │ │ │ ├── MakeWellFormed.php
│ │ │ │ ├── RemoveForeignElements.php
│ │ │ │ └── ValidateAttributes.php
│ │ │ ├── Strategy.php
│ │ │ ├── StringHash.php
│ │ │ ├── StringHashParser.php
│ │ │ ├── TagTransform/
│ │ │ │ ├── Font.php
│ │ │ │ └── Simple.php
│ │ │ ├── TagTransform.php
│ │ │ ├── Token/
│ │ │ │ ├── Comment.php
│ │ │ │ ├── Empty.php
│ │ │ │ ├── End.php
│ │ │ │ ├── Start.php
│ │ │ │ ├── Tag.php
│ │ │ │ └── Text.php
│ │ │ ├── Token.php
│ │ │ ├── TokenFactory.php
│ │ │ ├── URI.php
│ │ │ ├── URIDefinition.php
│ │ │ ├── URIFilter/
│ │ │ │ ├── DisableExternal.php
│ │ │ │ ├── DisableExternalResources.php
│ │ │ │ ├── HostBlacklist.php
│ │ │ │ ├── MakeAbsolute.php
│ │ │ │ └── Munge.php
│ │ │ ├── URIFilter.php
│ │ │ ├── URIParser.php
│ │ │ ├── URIScheme/
│ │ │ │ ├── ftp.php
│ │ │ │ ├── http.php
│ │ │ │ ├── https.php
│ │ │ │ ├── mailto.php
│ │ │ │ ├── news.php
│ │ │ │ └── nntp.php
│ │ │ ├── URIScheme.php
│ │ │ ├── URISchemeRegistry.php
│ │ │ ├── UnitConverter.php
│ │ │ ├── VarParser/
│ │ │ │ ├── Flexible.php
│ │ │ │ └── Native.php
│ │ │ ├── VarParser.php
│ │ │ └── VarParserException.php
│ │ ├── HTMLPurifier.auto.php
│ │ ├── HTMLPurifier.autoload.php
│ │ ├── HTMLPurifier.func.php
│ │ ├── HTMLPurifier.includes.php
│ │ ├── HTMLPurifier.kses.php
│ │ ├── HTMLPurifier.path.php
│ │ ├── HTMLPurifier.php
│ │ └── HTMLPurifier.safe-includes.php
│ ├── score.php
│ ├── shared.php
│ ├── template.class.php
│ └── timeago.php
├── views/
│ ├── answers/
│ │ └── edit.php
│ ├── comments/
│ │ └── post.php
│ ├── footer.php
│ ├── header.php
│ ├── helpers/
│ │ └── getuser.php
│ ├── questions/
│ │ ├── ask.php
│ │ ├── cache.php
│ │ ├── edit.php
│ │ ├── index.php
│ │ └── view.php
│ ├── tags/
│ │ └── index.php
│ └── users/
│ ├── edit.php
│ ├── index.php
│ ├── login.php
│ ├── logout.php
│ ├── register.php
│ └── view.php
└── web.config
================================================
FILE CONTENTS
================================================
================================================
FILE: .buildpath
================================================
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path=""/>
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>
================================================
FILE: .htaccess
================================================
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>
================================================
FILE: .project
================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>qwench_new</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.dltk.core.scriptbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.php.core.PHPNature</nature>
</natures>
</projectDescription>
================================================
FILE: .settings/org.eclipse.php.core.prefs
================================================
#Sat Oct 19 18:13:01 WAT 2013
eclipse.preferences.version=1
include_path=0;/qwench_new
================================================
FILE: LICENSE.TXT
================================================
Qwench
Copyright (c) 2009-2010 Inscripts
Qwench ('the Software') is a copyrighted work of authorship. Inscripts
retains ownership of the Software and any copies of it, regardless of the
form in which the copies may exist.
By installing and using Qwench on your server, you agree to the following
terms and conditions.
A Modification, or a Mod, is defined as instructions, to be performed
manually or in an automated manner, that alter any part of this Package.
A Modified Package is defined as this Package or a derivative of it with
one or more Modification applied to it. Distribution is defined as allowing
one or more other people to in any way download or receive a copy of this
Package, a Modified Package, or a derivative of this Package.
Such agreement is either on your own behalf or on behalf
of any corporate entity which employs you or which you represent
('Corporate Licensee'). In this Agreement, 'you' includes both the reader
and any Corporate Licensee and 'Inscripts' means Inscripts (I) Private Limited:
1. Permission is hereby granted to use, copy, modify and/or distribute this
Package, provided that:
a. All copyright notices within source files and as generated by the Software
as output are retained, unchanged.
b. Any Distribution of this Package, whether as a Modified Package or not,
includes this license and is released under the terms of this Agreement. This
clause is not dependant upon any measure of changes made to this Package.
c. This Package, Modified Packages, and derivative works may not be sold or
released under any paid license. Copying fees for the transport of this Package,
support fees for installation or other services, and hosting fees for hosting
the Software may, however, be imposed.
d. Any Distribution of this Package, whether as a Modified Package or not,
requires express written consent from Inscripts.
2.You may make Modifications to this Package or a derivative of it, and
distribute your Modifications in a form that is separate from the Package,
such as patches. The following restrictions apply to Modifications:
a. A Modification must not alter or remove any copyright notices in the
Software or Package, generated or otherwise.
b. When a Modification to the Package is released, a non-exclusive
royalty-free right is granted to Inscripts to distribute the Modification in
future versions of the Package provided such versions remain available under
the terms of this Agreement in addition to any other license(s) of the initial
developer.
c. Any Distribution of a Modified Package or derivative requires express
written consent from Inscripts.
3.Permission is hereby also granted to distribute programs which depend on
this Package, provided that you do not distribute any Modified Package
without express written consent.
All Software copyright notices within the scripts must remain unchanged (and visible).
The Software may not be used for anything that would represent or is associated
with an Intellectual Property violation, including, but not limited to,
engaging in any activity that infringes or misappropriates the intellectual property
rights of others, including copyrights, trademarks, service marks, trade secrets,
software piracy, and patents held by individuals, corporations, or other entities.
If any of the terms of this Agreement are violated, Inscripts reserves the right
to revoke the Software license at any time.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: README.TXT
================================================
Qwench
Copyright (c) 2009-2010 Inscripts
Installation Instructions
-----------------------------------------------
1. Modify config.php as per your site
2. Run install.php (using your browser)
3. Done! (Delete install.php)
4. Register on your new site :)
-----------------------------------------------
================================================
FILE: TODO.TXT
================================================
1 Visit the installation process, make more precise and show errors, rather than assume
everything works fine
2 Edit all forms and add placeholders
================================================
FILE: VERSION.TXT
================================================
1.0
================================================
FILE: config.default.php
================================================
<?php
// Database Details
define('SERVERNAME','localhost');
define('SERVERPORT','3306');
define('DBUSERNAME','root'); // Replace root with your database username. If unsure, leave as is.
define('DBPASSWORD','root'); // Replace root with your database user password.
define('DBNAME','YOUR_DB'); //Create a new database qwench on your server and replace YOUR_DB with it's name
Define('ANSWERS_PER_PAGE','10');
define('QUESTIONS_PER_PAGE','10');
//if you want to enable production mode vs debug mode (useful for error reporting)
//Possible values 1 = true or 0 = false
define('DEBUG_MODE','1');
// If you want only logged in users to view the site
define('ALLOW_VISITORS','1');
// Do not change salt after users have registered
define('SALT','yoursecurestringoverhere');
// Set default timezone if you want or comment the line below
date_default_timezone_set("Asia/Calcutta");
// No trailing slash
// Path to the Qwench folder
// If you have installed Qwench in your
// root folder then set
// define('BASE_DIR','');
define('BASE_DIR','/qwench');
// If URL-Rewriting does not work then set
// define('BASE_PATH',BASE_DIR.'/index.php');
// If URL-Rewriting works, then leave the line below as is
define('BASE_PATH',BASE_DIR);
================================================
FILE: controllers/answers.php
================================================
<?php
function edit() {
authenticate(1);
global $path;
global $template;
$answerid = sanitize($path[2],"int");
$basePath = basePath();
$basePathNS = basePathNS();
$js = <<<EOD
<script src="$basePathNS/js/showdown.js"></script>
<script src="$basePathNS/js/wmd.js"></script>
<link href="$basePathNS/css/wmd.css" type="text/css" rel="stylesheet" />
EOD;
$template->set('js',$js);
$sql = ("select * from answers where id = '".escape($answerid)."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$template->set('description',$result['description']);
$template->set('answerid',$result['id']);
}
function post() {
authenticate(1);
$basePath = basePath();
$description = sanitize($_POST['description'],"markdown");
$questionid = sanitize($_POST['questionid'],"int");
$sql = ("select * from questions where id = '".escape($questionid)."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
if (strlen($description) < 15 || $result['id'] == '' || $result['id'] == 0) {
header("Location: $basePath/questions/view/$questionid/{$result['slug']}");
exit;
}
$sql = ("insert into answers (questionid,description,created,updated,userid,accepted,votes) values ('".escape($questionid)."','".escape($description)."',NOW(),NOW(),'".escape($_SESSION['userid'])."','0','0')");
$query = mysql_query($sql);
$sql = ("update questions set updated = NOW(), answers=answers+1 where id = '".escape($result['id'])."'");
$query = mysql_query($sql);
header("Location: $basePath/questions/view/$questionid/{$result['slug']}");
}
function update() {
authenticate(1);
$answerid = sanitize($_POST['id'],"int");
$description = sanitize($_POST['description'],"markdown");
$sql = ("select * from answers where id = '".escape($answerid)."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$sql = ("select * from questions where id = '".escape($result['questionid'])."'");
$query = mysql_query($sql);
$qresult = mysql_fetch_array($query);
if ($qresult['userid'] != $_SESSION['userid']) {
$basePath = basePath();
header("Location: $basePath/questions/view/{$qresult['id']}/{$qresult['slug']}");
}
$sql = ("update answers set description = '".escape($description)."', updated = NOW() where userid = '".escape($_SESSION['userid'])."' and id = '".escape($answerid)."'");
$query = mysql_query($sql);
$sql = ("update questions set updated = NOW() where id = '".escape($result['questionid'])."'");
$query = mysql_query($sql);
$basePath = basePath();
header("Location: $basePath/questions/view/{$qresult['id']}/{$qresult['slug']}");
}
function vote() {
if ($_SESSION['userid'] == '') {
echo "0Please login to vote";
exit;
}
$id = sanitize($_POST['id'],"int");
$vote = sanitize($_POST['vote'],"string");
if ($vote == 'plus') {
$vote = '+1';
} else {
$vote = '-1';
}
$sql = ("select answers.userid,answers_votes.id qvid,answers_votes.vote qvvote from answers left join answers_votes on (answers.id = answers_votes.answerid and answers_votes.userid = '".escape($_SESSION['userid'])."') where answers.id = '".escape($id)."'");
$query = mysql_query($sql);
$answer = mysql_fetch_array($query);
if ($answer['userid'] == $_SESSION['userid']) {
echo "0"."You cannot up/down vote your own answer";
exit;
}
if ($answer['qvid'] > 0) {
if ($answer['qvvote'] == 1 && $vote == '+1') {
$vote = "-1";
score('a_upvoted_removed',$id,$answer['userid']);
} else if ($answer['qvvote'] == 1 && $vote == '-1') {
$vote = "-2";
score('a_upvoted_removed',$id,$answer['userid']);
score('a_downvoter',$id);
score('a_downvoted',$id,$answer['userid']);
} else if ($answer['qvvote'] == -1 && $vote == '-1') {
$vote = "+1";
score('a_downvoter_removed',$id);
score('a_downvoted_removed',$id,$answer['userid']);
} else if ($answer['qvvote'] == -1 && $vote == '+1') {
$vote = "+2";
score('a_downvoter_removed',$id);
score('a_downvoted_removed',$id,$answer['userid']);
score('a_upvoted',$id,$answer['userid']);
} else if ($answer['qvvote'] == 0) {
if ($vote == 1) {
score('a_upvoted',$id,$answer['userid']);
} else {
score('a_downvoter',$id);
score('a_downvoted',$id,$answer['userid']);
}
}
$sql = ("update answers_votes set vote = vote".escape($vote)." where id = '".$answer['qvid']."'");
$query = mysql_query($sql);
} else {
$sql = ("insert into answers_votes (answerid,userid,vote) values ('".escape($id)."','".escape($_SESSION['userid'])."','".escape($vote)."')");
$query = mysql_query($sql);
if ($vote == 1) {
score('a_upvoted',$id,$answer['userid']);
} else {
score('a_downvoter',$id);
score('a_downvoted',$id,$answer['userid']);
}
}
$sql_nest = ("update answers set votes = votes".escape($vote)." where id = '".escape($id)."'");
$query_nest = mysql_query($sql_nest);
echo "1Thankyou for voting";
exit;
}
function accept() {
authenticate(1);
$answerid = sanitize($_GET['id'],"int");
$sql = ("select questionid,userid from answers where id = '".escape($answerid)."'");
$query = mysql_query($sql);
$answer = mysql_fetch_array($query);
$sql = ("select questions.*,answers.id answerid, answers.userid answeruserid from questions left join answers on (questions.id = answers.questionid and answers.accepted = 1) where questions.id = '".escape($answer['questionid'])."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
if ($result['kb'] == 1) {
header("Location: $basePath/questions/view/{$result['id']}/{$result['slug']}");
exit;
}
if ($result['answerid'] > 0) {
score('a_accepted_removed',$answerid,$result['answeruserid']);
} else {
score('a_accepter',$answerid);
}
if ($result['userid'] == $_SESSION['userid']) {
$sql = ("update answers set accepted = '0' where questionid = '".escape($result['id'])."'");
$query = mysql_query($sql);
$sql = ("update answers set accepted = '1' where questionid = '".escape($result['id'])."' and id = '".escape($answerid)."'");
$query = mysql_query($sql);
$sql = ("update questions set accepted = '1' where id = '".escape($result['id'])."' and userid = '".escape($_SESSION['userid'])."'");
$query = mysql_query($sql);
score('a_accepted',$answerid,$answer['userid']);
}
$basePath = basePath();
header("Location: $basePath/questions/view/{$result['id']}/{$result['slug']}");
}
================================================
FILE: controllers/comments.php
================================================
<?php
function post() {
if ($_SESSION['userid'] == '') {
echo "0";
exit;
}
global $template;
global $noheader;
$noheader = true;
$id = sanitize($_POST['id'],"string");
$type = substr($id,0,1);
$typeid = substr($id,1);
if ($type == 'q') {
$type = 0;
} else {
$type = 1;
}
$comment = sanitize($_POST['comment'],"comment");
if (strlen($comment) < 10 || strlen($comment) > 600) {
echo "0An error has occurred. Please try again later";
exit;
}
$sql = ("insert into comments (type,comment,votes,created,userid,typeid) values ('".escape($type)."','".escape($comment)."','0',NOW(),'".escape($_SESSION['userid'])."','".escape($typeid)."')");
$query = mysql_query($sql);
$template->set('comment',$comment);
$firstname = $_SESSION['name'];
$pos = strpos($_SESSION['name'],' ');
if ($pos > 0) {
$firstname = substr($_SESSION['name'],0,$pos);
}
$template->set('username',$firstname);
$template->set('userid',$_SESSION['userid']);
}
function vote() {
if ($_SESSION['userid'] == '') {
echo "0Please login to vote";
exit;
}
$id = sanitize($_POST['id'],"int");
$sql = ("select userid from comments where id = '".escape($id)."'");
$query = mysql_query($sql);
$comment = mysql_fetch_array($query);
if ($comment['userid'] == $_SESSION['userid']) {
echo "0You cannot upvote your own comment";
exit;
}
$sql = ("select * from comments_votes where commentid = '".escape($id)."' and userid = '".escape($_SESSION['userid'])."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
if ($result['id'] > 0) {
$sql = ("delete from comments_votes where commentid = '".escape($id)."' and userid = '".escape($_SESSION['userid'])."'");
$query = mysql_query($sql);
$sql_nest = ("update comments set votes = votes-1 where id = '".escape($id)."'");
$query_nest = mysql_query($sql_nest);
score('c_upvoted_removed',$id,$comment['userid']);
} else {
$sql = ("insert into comments_votes (commentid,userid) values ('".escape($id)."','".escape($_SESSION['userid'])."')");
$query = mysql_query($sql);
$sql_nest = ("update comments set votes = votes+1 where id = '".escape($id)."'");
$query_nest = mysql_query($sql_nest);
score('c_upvoted',$id,$comment['userid']);
}
echo "1";
exit;
}
function del() {
$id = sanitize($_POST['id'],"int");
$sql = ("delete from comments where id = '".escape($id)."' and userid = '".escape($_SESSION['userid'])."'");
$query = mysql_query($sql);
echo "1Comment successfully deleted";
exit;
}
================================================
FILE: controllers/helpers.php
================================================
<?php
function getUser($id) {
global $helper;
$id = sanitize($id,"int");
$sql = ("select * from users where id = '".escape($id)."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$helper->set('user',$result);
return $helper->render();
}
================================================
FILE: controllers/questions.php
================================================
<?php
function ask() {
authenticate(1);
global $template;
$basePath = basePath();
$basePathNS = basePathNS();
$js = <<<EOD
<script src="$basePathNS/js/showdown.js"></script>
<script src="$basePathNS/js/wmd.js"></script>
<link href="$basePathNS/css/wmd.css" type="text/css" rel="stylesheet" />
<script>
$(document).ready(function() {
$("#tags").fcbkcomplete({
json_url: "$basePath/questions/fetchtags",
json_cache: true,
filter_case: true,
filter_hide: true,
newel: true
});
});
</script>
EOD;
$template->set('js',$js);
}
function edit() {
authenticate(1);
global $path;
global $template;
$basePath = basePath();
$basePathNS = basePathNS();
$questionid = sanitize($path[2],"int");
$js = <<<EOD
<script src="$basePathNS/js/showdown.js"></script>
<script src="$basePathNS/js/wmd.js"></script>
<link href="$basePathNS/css/wmd.css" type="text/css" rel="stylesheet" />
<script>
$(document).ready(function() {
$("#tags").fcbkcomplete({
json_url: "$basePath/questions/fetchtags",
json_cache: true,
filter_case: true,
filter_hide: true,
newel: true
});
});
</script>
EOD;
$template->set('js',$js);
$sql = ("select * from questions where id = '".escape($questionid)."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$template->set('title',$result['title']);
$template->set('description',$result['description']);
$template->set('link',$result['link']);
$template->set('kb',$result['kb']);
$sql = ("select tag from tags_questions, tags where questionid = '".escape($questionid)."' and tags.id = tags_questions.tagid order by tag");
$query = mysql_query($sql);
$tags = array();
while ($result = mysql_fetch_array($query)) {
$tags[] = $result['tag'];
}
$template->set('tags',$tags);
$template->set('questionid',$questionid);
}
function post() {
authenticate(1);
$basePath = basePath();
$title = sanitize($_POST['title'],"string");
$description = sanitize($_POST['description'],"markdown");
$link = sanitize($_POST['link'],"url");
$slug = createSlug($title);
$kb = 0;
if (!empty($_POST['answercheck'])) {
$kb = sanitize($_POST['answercheck'],"int");
}
$cache = '';
if (!empty($link)) {
$cache = fetchURL($link);
}
if (strlen($title) < 15 || strlen($description)<15) {
header("Location: $basePath/questions/ask");
exit;
}
$sql = ("insert into questions (title,description,created,updated,link,userid,slug,linkcache,votes,accepted,answers,kb) values ('".escape($title)."','".escape($description)."',NOW(),NOW(),'".escape($link)."','".escape($_SESSION['userid'])."','".escape($slug)."','".escape($cache)."','0','0','0','".escape($kb)."')");
$query = mysql_query($sql);
$questionid = mysql_insert_id();
if (!empty($_POST['tags'])) {
foreach ($_POST['tags'] as $tag) {
$tag = createSlug($tag);
$sql = ("select * from tags where tag = '".escape($tag)."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
if ($result['id'] > 0) {
$sql = ("insert into tags_questions (tagid,questionid) values ('".escape($result['id'])."','".escape($questionid)."')");
$query = mysql_query($sql);
} else {
$sql = ("insert into tags (tag) values ('".escape($tag)."')");
$query = mysql_query($sql);
$tagid = mysql_insert_id();
$sql = ("insert into tags_questions (tagid,questionid) values ('".escape($tagid)."','".escape($questionid)."')");
$query = mysql_query($sql);
}
}
}
if (!empty($_POST['answer'])) {
$description = sanitize($_POST['answer'],"markdown");
$sql = ("insert into answers (questionid,description,created,updated,userid,accepted,votes) values ('".escape($questionid)."','".escape($description)."',NOW(),NOW(),'".escape($_SESSION['userid'])."','1','0')");
$query = mysql_query($sql);
}
if ($kb == 1) {
score('kb_posted',$questionid);
}
header("Location: $basePath/questions/view/$questionid/$slug");
}
function update() {
authenticate(1);
$questionid = sanitize($_POST['id'],"int");
$title = sanitize($_POST['title'],"string");
$description = sanitize($_POST['description'],"markdown");
$link = sanitize($_POST['link'],"url");
$slug = createSlug($title);
$kb = 0;
if (!empty($_POST['answercheck'])) {
$kb = sanitize($_POST['answercheck'],"int");
}
$cache = '';
if (!empty($link)) {
$cache = fetchURL($link);
}
$sql = ("select * from questions where id = '".escape($questionid)."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
if ($result['userid'] != $_SESSION['userid']) {
$basePath = basePath();
header("Location: $basePath/questions/view/{$result['id']}/{$result['slug']}");
}
$cacheup = '';
if ($result['link'] != $link) {
$cacheup = ",linkcache = '".escape($cache)."'";
}
if ($result['kb'] == 1 && $kb == 0) {
score('kb_posted_removed',$questionid);
} else if ($result['kb'] == 0 && $kb == 1) {
score('kb_posted',$questionid);
}
$sql = ("update questions set title = '".escape($title)."', kb = '".escape($kb)."', description = '".escape($description)."' , updated = NOW(), link = '".escape($link)."', slug = '".escape($slug)."' $cacheup where userid = '".escape($_SESSION['userid'])."' and id = '".escape($questionid)."'");
$query = mysql_query($sql);
echo mysql_error();
$sql = ("delete from tags_questions where questionid = '".escape($questionid)."'");
$query = mysql_query($sql);
if (!empty($_POST['tags'])) {
foreach ($_POST['tags'] as $tag) {
$tag = createSlug($tag);
$sql = ("select * from tags where tag = '".escape($tag)."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
if ($result['id'] > 0) {
$sql = ("insert into tags_questions (tagid,questionid) values ('".escape($result['id'])."','".escape($questionid)."')");
$query = mysql_query($sql);
} else {
$sql = ("insert into tags (tag) values ('".escape($tag)."')");
$query = mysql_query($sql);
$tagid = mysql_insert_id();
$sql = ("insert into tags_questions (tagid,questionid) values ('".escape($tagid)."','".escape($questionid)."')");
$query = mysql_query($sql);
}
}
}
$basePath = basePath();
header("Location: $basePath/questions/view/$questionid/$slug");
}
function fetchtags() {
noRender();
$tag = createSlug($_GET['tag']);
header('Content-type: application/json; charset=utf-8');
$sql = ("select * from tags where tag LIKE '%".escape($tag)."%'");
$query = mysql_query($sql);
$resultSet = array();
while ($result = mysql_fetch_array($query)) {
$resultSet[] = array("caption" => $result['tag'], "value" => $result['tag']);
}
echo json_encode($resultSet);
exit();
}
function view() {
global $path;
global $template;
$questionid = sanitize($path[2],"int");
$sql = ("select * from questions where id = '".escape($questionid)."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$template->set('id',$result['id']);
$template->set('userid',$result['userid']);
$template->set('title',$result['title']);
$template->set('created',$result['created']);
$template->set('description',Markdown($result['description']));
$template->set('kb',$result['kb']);
$template->set('link',$result['link']);
$cache = 0;
if (!empty($result['linkcache'])) {
$cache = 1;
}
$template->set('cache',$cache);
$sql = ("select tag from tags_questions, tags where questionid = '".escape($questionid)."' and tags.id = tags_questions.tagid order by tag");
$query = mysql_query($sql);
$tags = array();
while ($result = mysql_fetch_array($query)) {
$tags[] = $result['tag'];
}
$template->set('tags',$tags);
$sql = ("select * from favorites where questionid = '".escape($questionid)."' and userid = '".escape($_SESSION['userid'])."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$fave = 0;
if ($result['id'] > 0) { $fave = 1; }
$template->set('fave',$fave);
$sql = ("select sum(vote) count from questions_votes where questionid = '".escape($questionid)."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$votes = $result['count'];
if ($votes == '') { $votes = 0; }
$template->set('votes',$votes);
$sql = ("select vote from questions_votes where questionid = '".escape($questionid)."' and userid = '".escape($_SESSION['userid'])."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$nvote = 0;
$pvote = 0;
if ($result['vote'] == -1) {
$nvote = 1;
}
if ($result['vote'] == 1) {
$pvote = 1;
}
$template->set('nvote',$nvote);
$template->set('pvote',$pvote);
$sql = ("select comments.id,comment,comments.userid,users.name username, comments_votes.id voted, comments.votes from comments left join users on comments.userid = users.id left join comments_votes on (comments_votes.commentid = comments.id and comments_votes.userid = '".escape($_SESSION['userid'])."') where type = '0' and typeid = '".escape($questionid)."' order by comments.created asc");
$query = mysql_query($sql);
$comments = array();
while ($result = mysql_fetch_array($query)) {
$pos = strpos($result['username'],' ');
if ($pos > 0) {
$result['username'] = substr($result['username'],0,$pos);
}
$comments[] = array("id" => $result['id'], "comment" => $result['comment'], "userid" => $result['userid'], "username" => $result['username'], "voted" => $result['voted'], "votes" => $result['votes']);
}
$template->set('comments',$comments);
$sql = ("select count(id) count from answers where questionid = '".escape($questionid)."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$template->set('answerscount',$result['count']);
$order = "votes desc";
$orderby = "votes";
$page = 1;
if (!empty($_GET['order'])) {
if ($_GET['order'] == "newest") {
$order = "created desc";
$orderby = "newest";
} else if ($_GET['order'] == "oldest") {
$order = "created asc";
$orderby = "oldest";
}
}
if (!empty($_GET['page'])) {
$page = $_GET['page'];
}
$offset = ($page-1)*ANSWERS_PER_PAGE;
$paging = new Pagination();
$paging->set('urlscheme','?order='.$orderby.'&page=%page%');
$paging->set('perpage',ANSWERS_PER_PAGE);
$paging->set('page',$page);
$paging->set('total',$result['count']);
$paging->set('order',$orderby);
$template->set('pagination',$paging->display());
$paging->set('urlscheme','?order=%label%&page=1');
$template->set('orderOptions',$paging->displayOptions());
$sqlanswer = '';
if ($page == 1) {
$sqlanswer = "(select answers.*,users.name username from answers,users where questionid = '".escape($questionid)."' and answers.userid = users.id and answers.accepted = '1') UNION ";
}
$sql = ("$sqlanswer (select answers.*,users.name username from answers,users where questionid = '".escape($questionid)."' and answers.userid = users.id and answers.accepted = '0' order by $order, created desc LIMIT ".ANSWERS_PER_PAGE." OFFSET $offset)");
$query = mysql_query($sql);
$answers = array();
while ($result = mysql_fetch_array($query)) {
$sql_nest = ("select sum(vote) count from answers_votes where answerid = '".escape($result['id'])."'");
$query_nest = mysql_query($sql_nest);
$result_nest = mysql_fetch_array($query_nest);
$votes = $result_nest['count'];
if ($votes == '') { $votes = 0; }
$sql_nest = ("select vote from answers_votes where answerid = '".escape($result['id'])."' and userid = '".escape($_SESSION['userid'])."'");
$query_nest = mysql_query($sql_nest);
$result_nest = mysql_fetch_array($query_nest);
$nvote = 0;
$pvote = 0;
if ($result_nest['vote'] == -1) {
$nvote = 1;
}
if ($result_nest['vote'] == 1) {
$pvote = 1;
}
$sql_nest = ("select comments.id,comment,comments.userid,users.name username, comments_votes.id voted, comments.votes from comments left join users on comments.userid = users.id left join comments_votes on (comments_votes.commentid = comments.id and comments_votes.userid = '".escape($_SESSION['userid'])."') where type = '1' and typeid = '".escape($result['id'])."' order by comments.created asc");
$query_nest = mysql_query($sql_nest);
$comments = array();
while ($result_nest = mysql_fetch_array($query_nest)) {
$pos = strpos($result['username'],' ');
if ($pos > 0) {
$result['username'] = substr($result['username'],0,$pos);
}
$comments[] = array("id" => $result_nest['id'], "comment" => $result_nest['comment'], "userid" => $result_nest['userid'], "username" => $result['username'], "voted" => $result_nest['voted'], "votes" => $result_nest['votes']);
}
$answers[] = array ("description" => Markdown($result['description']), "created" => $result['created'], "updated" => $result['updated'], "userid" => $result['userid'], "username" => $result['username'], "pvote" => $pvote, "nvote" => $nvote, "votes" => $votes, "id" => $result['id'], "accepted"=> $result['accepted'], "comments" => $comments );
}
$template->set('answers',$answers);
$basePathNS = basePathNS();
$js = '';
if ($_SESSION['userid'] != '') {
$js = <<<EOD
<script src="$basePathNS/js/showdown.js"></script>
<script src="$basePathNS/js/wmd.js"></script>
<link href="$basePathNS/css/wmd.css" type="text/css" rel="stylesheet" />
EOD;
}
$js .= <<<EOD
<script>
var basePath = "{$basePath}";
function vote(elem,type,voted) {
\$this = $(elem);
var id = \$this.parent().parent().parent().attr('id');
var add = 1;
var minus = -1;
var up = 'up';
var down = 'down';
if (voted == 'minus') { add = -1; minus = 1; up = 'down'; down = 'up'; }
$.post(basePath+"/"+type+"/vote", { id: id, vote: voted },
function(data) {
var result = data.substr(0,1);
var message = data.substr(1);
if (result == 1) {
if (!$("#"+id+" .questionsview_"+up+"").hasClass("voteselected")) {
$("#"+id+" .questionsview_vote").html(parseInt($("#"+id+" .questionsview_vote").html())+add);
if ($("#"+id+" .questionsview_"+down+"").hasClass("voteselected")) {
$("#"+id+" .questionsview_vote").html(parseInt($("#"+id+" .questionsview_vote").html())+add);
$("#"+id+" .questionsview_"+down+"").removeClass("voteselected");
}
} else {
$("#"+id+" .questionsview_vote").html(parseInt($("#"+id+" .questionsview_vote").html())+minus);
}
\$this.toggleClass("voteselected");
}
if (message != '') {
$.fancyalert(message);
}
});
}
$(document).ready(function() {
$(".questionsview_answer .questionsview_up").click(function() {
vote(this,'answers','plus');
});
$(".questionsview_answer .questionsview_down").click(function() {
vote(this,'answers','minus');
});
$(".questionsview_question .questionsview_up").click(function() {
vote(this,'questions','plus');
});
$(".questionsview_question .questionsview_down").click(function() {
vote(this,'questions','minus');
});
$(".questionsview_question .questionsview_fave").click(function() {
\$this = $(this);
var id = \$this.parent().parent().parent().attr('id');
$.post(basePath+"/questions/fave", { id: id },
function(data) {
var result = data.substr(0,1);
var message = data.substr(1);
if (result == 1) {
\$this.toggleClass("voteselected");
}
$.fancyalert(message);
});
});
$(".commentfave").click(function() {
var id = $(this).attr('id');
\$this = $(this);
$.post(basePath+"/comments/vote", { id: id },
function(data) {
var result = data.substr(0,1);
var message = data.substr(1);
if (result == "1") {
if (\$this.next('div').html() == '') {
\$this.next('div').html('0');
}
if (!\$this.hasClass("voteselected")) {
\$this.next('div').html(parseInt(\$this.next('div').html())+1);
} else {
\$this.next('div').html(parseInt(\$this.next('div').html())-1);
}
\$this.toggleClass("voteselected");
}
if (message != '') {
$.fancyalert(message);
}
});
});
$(".commentdel").click(function() {
var answer = confirm("Delete this comment?")
if (answer){
var id = $(this).attr('id');
\$this = $(this);
$.post(basePath+"/comments/del", { id: id },
function(data) {
var result = data.substr(0,1);
var message = data.substr(1);
if (result == "1") {
\$this.parent().fadeOut(2000);
}
if (message != '') {
$.fancyalert(message);
}
});
}
});
var comments = $(".comments");
$.each(comments, function() {
var elements = ( $('.comment:gt(4)',$(this)).size());
if (elements > 0) {
$('.viewallcomments',$(this)).css('display','block');
$('.viewallcomments a',$(this)).html('View all comments ('+elements+' more)');
}
allComments = $(".comment",$(this)).get();
allComments.sort(function(a,b) {
a = $(".commentfavevotes",a).html();
b = $(".commentfavevotes",b).html();;
if (a == '') a = 0;
if (b == '') b = 0;
if (a > b) {
return -1;
} else if (a < b) {
return 1;
} else {
return 0;
}
});
$(allComments.slice(5)).hide();
});
});
function comment(id) {
$("#comment_"+id).html("<textarea class=\"commenttextarea\" id='commenttext_"+id+"'></textarea><input class=\"smallbutton\" type=\"submit\" value=\"Add Comment\" onclick=\"addcomment('"+id+"')\"/>");
}
function addcomment(id) {
var comment = $("#commenttext_"+id).val();
if (comment.length < 10) {
$.fancyalert('Your comment must be atleast 10 characters in length');
return;
}
if (comment.length > 600) {
$.fancyalert('Your comment is too long, please reduce it to 600 characters');
return;
}
$("#commenttext_"+id).val('');
$.post(basePath+"/comments/post", { id: id, comment: comment },
function(data) {
if (data == 0) {
$("#commenttext_"+id).val(comment);
$.fancyalert('Please login to post a comment');
} else {
$("#comments_"+id).append(data);
}
});
}
function viewallcomments(id){
$('#comments_'+id+' .comment').fadeIn(1000);
$('#comment_'+id+' .viewallcomments').css('display','none');
}
</script>
EOD;
$template->set('js',$js);
}
function cache() {
global $path;
global $template;
global $noheader;
$noheader = true;
$questionid = sanitize($path[2],"int");
$sql = ("select * from questions where id = '".escape($questionid)."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$template->set('cachelink',$result['link']);
$template->set('cache',$result['linkcache']);
}
function vote() {
if ($_SESSION['userid'] == '') {
echo "0Please login to vote";
exit;
}
$id = sanitize($_POST['id'],"int");
$vote = sanitize($_POST['vote'],"string");
if ($vote == 'plus') {
$vote = '+1';
} else {
$vote = '-1';
}
$sql = ("select questions.userid,questions_votes.id qvid,questions_votes.vote qvvote from questions left join questions_votes on (questions.id = questions_votes.questionid and questions_votes.userid = '".escape($_SESSION['userid'])."') where questions.id = '".escape($id)."'");
$query = mysql_query($sql);
$question = mysql_fetch_array($query);
if ($question['userid'] == $_SESSION['userid']) {
echo "0"."You cannot up/down vote your own question";
exit;
}
if ($question['qvid'] > 0) {
if ($question['qvvote'] == 1 && $vote == '+1') {
$vote = "-1";
score('q_upvoted_removed',$id,$question['userid']);
} else if ($question['qvvote'] == 1 && $vote == '-1') {
$vote = "-2";
score('q_upvoted_removed',$id,$question['userid']);
score('q_downvoter',$id);
score('q_downvoted',$id,$question['userid']);
} else if ($question['qvvote'] == -1 && $vote == '-1') {
$vote = "+1";
score('q_downvoter_removed',$id);
score('q_downvoted_removed',$id,$question['userid']);
} else if ($question['qvvote'] == -1 && $vote == '+1') {
$vote = "+2";
score('q_downvoter_removed',$id);
score('q_downvoted_removed',$id,$question['userid']);
score('q_upvoted',$id,$question['userid']);
} else if ($question['qvvote'] == 0) {
if ($vote == 1) {
score('q_upvoted',$id,$question['userid']);
} else {
score('q_downvoter',$id);
score('q_downvoted',$id,$question['userid']);
}
}
$sql = ("update questions_votes set vote = vote".escape($vote)." where id = '".$question['qvid']."'");
$query = mysql_query($sql);
} else {
$sql = ("insert into questions_votes (questionid,userid,vote) values ('".escape($id)."','".escape($_SESSION['userid'])."','".escape($vote)."')");
$query = mysql_query($sql);
if ($vote == 1) {
score('q_upvoted',$id,$question['userid']);
} else {
score('q_downvoter',$id);
score('q_downvoted',$id,$question['userid']);
}
}
$sql_nest = ("update questions set votes = votes".escape($vote)." where id = '".escape($id)."'");
$query_nest = mysql_query($sql_nest);
echo "1Thankyou for voting";
exit;
}
function fave() {
if ($_SESSION['userid'] == '') {
echo "0Please login to add a question to your favorites";
exit;
}
$id = sanitize($_POST['id'],"int");
$sql = ("select * from favorites where questionid = '".escape($id)."' and userid = '".escape($_SESSION['userid'])."'");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
if ($result['id'] > 0) {
$sql = ("delete from favorites where questionid = '".escape($id)."' and userid = '".escape($_SESSION['userid'])."'");
$query = mysql_query($sql);
echo "1Question removed from your favorites";
} else {
$sql = ("insert into favorites (questionid,userid) values ('".escape($id)."','".escape($_SESSION['userid'])."')");
$query = mysql_query($sql);
echo "1Question added to your favorites";
}
exit;
}
function index() {
global $path;
global $template;
$conditionspre = '';
$conditionspost = '';
$conditionsselect = '';
$extratitle = '';
$orderby = 'newest';
$order = 'created desc';
$defaultorder = 1;
$nopagination = 0;
$page = 1;
$searchstringoriginal = '';
if (!empty($_GET['search'])) { $searchstringoriginal = sanitize($_GET['search'],"string"); }
if (!empty($_GET['order'])) {
if ($_GET['order'] == "votes") {
$order = "votes desc";
$orderby = "votes";
$defaultorder = 0;
} else if ($_GET['order'] == "oldest") {
$order = "created asc";
$orderby = "oldest";
$defaultorder = 0;
} else if ($_GET['order'] == "relevance") {
$order = "score desc";
$orderby = "relevance";
$defaultorder = 0;
} else if ($_GET['order'] == "newest") {
$defaultorder = 0;
}
}
if (!empty($_GET['page'])) {
$page = sanitize($_GET['page'],"int");
}
$type = '';
if (!empty($_GET['type'])) {
$type = "&type=".sanitize($_GET['type'],"string");
if (sanitize($_GET['type'],"string") == "unanswered") {
// $conditionspost .= " questions.id NOT IN (select questions.id from questions,answers where questions.id = answers.questionid and answers.accepted = 1) and ";
$conditionspost .= " questions.accepted = 0 and questions.kb = 0 and ";
$extratitle = " not yet answered";
} else {
$extratitle = " active";
$order = " updated desc ";
$nopagination = 1;
}
}
$template->set('nopagination',$nopagination);
$search = '';
$searchstring = urldecode($searchstringoriginal);
if (!empty($searchstringoriginal)) {
$search = "&search=".urlencode($searchstring);
$conditionspost .= " MATCH(title, description) AGAINST ('".escape($searchstring)."') and ";
$conditionsselect .= ",MATCH(title, description) AGAINST ('".escape($searchstring)."') AS score ";
$extratitle = " showing ".$searchstring;
if ($defaultorder == 1) {
$orderby = 'relevance';
$order = 'score desc';
}
}
$template->set('searchstring',$searchstring);
$tag = '';
if (!empty($_GET['tag'])) {
$tag = "&tag=".createSlug($_GET['tag']);
$conditionspre .= ",tags_questions, tags";
$conditionspost .= " tags_questions.questionid = questions.id and tags.id = tags_questions.tagid and tags.tag LIKE '".escape(createSlug($_GET['tag']))."' and ";
$extratitle = " tagged ".createSlug($_GET['tag']);
}
$offset = ($page-1)*QUESTIONS_PER_PAGE;
$sql = ("select count(questions.id) count from questions $conditionspre WHERE $conditionspost 1");
$query = mysql_query($sql);
$result = mysql_fetch_array(mysql_query($sql));
$template->set('questionscount',$result['count']);
$paging = new Pagination();
$paging->set('urlscheme','?order='.$orderby.$tag.$type.$search.'&page=%page%');
$paging->set('perpage',QUESTIONS_PER_PAGE);
$paging->set('page',$page);
$paging->set('total',$result['count']);
$paging->set('order',$orderby);
$paging->set('search',$search);
$template->set('pagination',$paging->display());
$paging->set('urlscheme','?order=%label%'.$tag.$type.$search.'&page=1');
$template->set('orderOptions',$paging->displayOptions());
$template->set('extratitle',$extratitle);
$sql = ("select questions.* $conditionsselect from questions $conditionspre WHERE $conditionspost 1 order by $order, created desc LIMIT ".QUESTIONS_PER_PAGE." OFFSET $offset");
$query = mysql_query($sql);
$questions = array();
while ($result = mysql_fetch_array($query)) {
$sql_nest = ("select tag from tags_questions, tags where questionid = '".escape($result['id'])."' and tags.id = tags_questions.tagid order by tag");
$query_nest = mysql_query($sql_nest);
$tags = array();
while ($result_nest = mysql_fetch_array($query_nest)) {
$tags[] = $result_nest['tag'];
}
$description = truncate(trim(sanitize(Markdown($result['description']),"string")));
if (!empty($searchstring)) {
$description = highlight(excerpt((trim(sanitize(Markdown($result['description']),"string"))),$searchstring),$searchstring);
$result['title'] = highlight($result['title'],$searchstring);
}
$questions[] = array ("title" => $result['title'], "created" => $result['created'], "updated" => $result['updated'], "userid" => $result['userid'], "link" => $result['link'], "slug" => $result['slug'], "answers" => $result['answers'], "accepted" => $result['accepted'], "kb" => $result['kb'], "votes" => $result['votes'], "id" => $result['id'], "tags" => $tags, "description" => $description);
}
$template->set('questions',$questions);
}
================================================
FILE: controllers/tags.php
================================================
<?php
function index() {
global $template;
$sql = ("select count(id) count from tags");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$template->set('count',$result['count']);
$sql = ("select tag, count(tags_questions.questionid) tagcount from tags, tags_questions where tags.id = tags_questions.tagid group by tagid order by tagcount desc");
$query = mysql_query($sql);
$tags = array();
while ($result = mysql_fetch_array($query)) {
$tags[] = array ("tag" => $result['tag'], "count" => $result['tagcount']);
}
$template->set('tags',$tags);
/* Add Pagination Later */
}
================================================
FILE: controllers/users.php
================================================
<?php
function login() {
global $template;
$template->set('loginpage','1');
}
function view() {
global $path;
global $template;
$userid = sanitize($path[2],"int");
$sql = ("select * from users where id = '".escape($userid)."'");
$query = mysql_query($sql);
$user = mysql_fetch_array($query);
$basePath = basePath();
$template->set('user',$user);
}
function edit() {
authenticate(1);
global $template;
$sql = ("select * from users where id = '".escape($_SESSION['userid'])."'");
$query = mysql_query($sql);
$user = mysql_fetch_array($query);
$basePath = basePath();
$template->set('user',$user);
}
function update() {
authenticate(1);
global $template;
$name = sanitize($_POST['name'],"string");
$email = sanitize($_POST['email'],"email");
$password = sanitize($_POST['password'],"string");
$password = sha1(SALT.$password.$email);
if (!empty($_POST['password'])) {
$sql = ("update users set password = '".escape($password)."' where id = '".escape($_SESSION['userid'])."'");
$query = mysql_query($sql);
}
$sql = ("update users set name = '".escape($name)."', email = '".escape($email)."' where id = '".escape($_SESSION['userid'])."'");
$query = mysql_query($sql);
$slug = createslug($name);
$basePath = basePath();
header("Location: $basePath/users/view/{$_SESSION['userid']}/$slug");
}
function validate() {
$email = sanitize($_POST['email'],"email");
$password = sanitize($_POST['password'],"string");
$password = sha1(SALT.$password.$email);
$sql = "select * from users where email = '".escape($email)."' and password = '".escape($password)."'";
$query_result = mysql_query($sql);
$user = mysql_fetch_array($query_result);
$basePath = basePath();
if ($user['id'] > 0) {
$_SESSION['userid'] = $user['id'];
$_SESSION['name'] = $user['name'];
$_SESSION['email'] = $user['email'];
$_SESSION['password'] = $user['password'];
$_SESSION['points'] = $user['points'];
if (!empty($_POST['returnurl'])) {
$url = sanitize($_POST['returnurl'],"url");
header("Location: {$url}");
} else {
header("Location: $basePath");
}
} else {
header("Location: $basePath/users/login");
}
}
function register() {
}
function create() {
$name = sanitize($_POST['name'],"string");
$email = sanitize($_POST['email'],"email");
$password = sanitize($_POST['password'],"string");
$password = sha1(SALT.$password.$email);
$sql = ("insert into users (name,email,password,points,moderator,created,lastactivity) values ('".escape($name)."','".escape($email)."','".escape($password)."','1','0',NOW(),NOW())");
$query = mysql_query($sql);
validate();
}
function logout() {
session_destroy();
session_start();
$_SESSION['userid'] = '';
}
function index() {
global $template;
$sql = ("select count(id) count from users");
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$template->set('count',$result['count']);
$sql = ("select * from users order by points desc, name asc");
$query = mysql_query($sql);
$users = array();
while ($result = mysql_fetch_array($query)) {
$users[] = array ("id" => $result['id'], "name" => $result['name'], "points" => $result['points']);
}
$template->set('users',$users);
/* Add Pagination Later */
}
================================================
FILE: css/main.css
================================================
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
body {
line-height: 1;
color: black;
background: white;
}
ol, ul {
line-height: 130%;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
body {
font-family:Arial,"Bitstream Vera Sans",sans-serif;
font-size:15px;
color: #333;
}
p {
color: #333333;
}
a {
text-decoration: none;
border-bottom: 1px dotted #333333;
color: #333333;
}
pre {
font-size: 11px;
background-color: #D3F6FF;
padding: 5px;
max-height: 200px;
overflow: auto;
line-height: 130%;
}
* html pre {
height: expression( this.scrollHeight > 199 ? "200px" : "auto" ); /* sets max-height for IE */
}
#container {
width: 960px;
margin: 0 auto;
}
.textbox {
width: 654px;
border: 1px solid #d1dbbd;
color: #666666;
font-size: 15px;
padding: 3px;
}
.textarea {
width: 654px;
border: 1px solid #d1dbbd;
color: #666666;
font-size: 15px;
padding: 3px;
height: 300px;
}
h1 {
color: #333333;
font-size: 20px;
font-weight: bold;
padding-left: 5px;
padding-bottom: 7px;
}
h2 {
color: #333333;
font-size: 17px;
font-weight: bold;
padding-left: 5px;
padding-top: 7px;
padding-bottom: 7px;
}
h3 {
color: #333333;
font-size: 15px;
font-weight: bold;
padding-left: 5px;
padding-top: 7px;
padding-bottom: 7px;
}
p {
line-height: 130%;
}
.button {
border: 1px solid #ccc;
color: #666666;
font-size: 15px;
padding: 3px;
}
strong {
font-weight: bold;
}
/* questions/ask */
/*
* html div#preview {
height: expression( this.scrollHeight > 499 ? "500px" : "auto" ); /* sets max-height for IE
}
div#preview {
max-height: 500px; /* sets max-height value for all standards-compliant browsers
}
*/
.questionsview_rating {
float: left;
}
.questionsview_box {
font-weight: bold;
font-size: 12px;
margin-right: 20px;
width: 38px;
}
.noborder {
border: 0px !important;
float:left;
margin-top:10px !important;
padding: 0px !important;
}
.nopadding {
padding-right: 5px !important;
}
.questionsview_vote {
color: #000;
font-weight: bold;
text-align: center;
font-size: 30px;
}
.questionsview_down {
padding-top: 3px;
padding-bottom: 3px;
text-align: center;
font-size:25px;
color: #555;
cursor: pointer;
}
.questionsview_up {
padding-top: 3px;
padding-bottom: 3px;
text-align: center;
font-size:25px;
color: #555;
cursor: pointer;
}
.questionsview_fave {
padding-top: 3px;
padding-bottom: 3px;
text-align: center;
font-size:25px;
color: #555;
cursor: pointer;
}
.questionsview_question {
padding-top: 15px;
padding-bottom: 15px;
margin-top: 10px;
margin-bottom: 10px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
width: 658px;
padding-left: 5px;
padding-right: 5px;
}
.questionsview_answer {
padding-top: 15px;
padding-bottom: 15px;
margin-top: 10px;
margin-bottom: 0px;
border-top: 1px solid #ccc;
width: 658px;
padding-left: 5px;
padding-right: 5px;
}
.questionsview_form {
padding-top: 15px;
padding-bottom: 15px;
margin-top: 10px;
margin-bottom: 10px;
border-top: 1px solid #ccc;
width: 668px;
}
.questionsview_answerdescription {
float:left;
width: 600px;
}
.questionsview_questiondescription {
float:left;
width: 600px;
}
.voteselected {
color: #21a5ca !important;
font-weight: bold !important;
}
#navigation {
background-color: #16bae2;
margin-bottom: 30px;
color: #ffffff;
text-shadow: 0px 2px 3px #d3d4aa;
font-size: 12px;
font-weight: bold;
border-bottom: 2px solid #21a5ca;
}
#navigation a {
color: white;
border-bottom: 0px;
font-weight: bold;
}
.navcenter {
width: 960px;
margin: 0 auto;
text-align:center;
}
.navcenter input {
height: 20px;
width: 400px;
margin: 5px;
font-size: 14px;
padding: 2px;
color: #666;
-moz-border: 3px;
border: 1px solid #21a5ca;
margin-left: 0px !important;
}
#navigation ol {
list-style: none;
padding: 0;
margin: 0 !important;
}
#navigation li {
float: left;
padding: 10px;
padding-left:12px;
padding-right:12px;
border-right: 1px solid #13a1c9;
border-left: 1px solid #45c9e9;
}
#navigation li:hover {
background-color: #45c6e6;
cursor:pointer;
}
body {
margin-bottom: 30px;
}
#leftpanel {
width: 658px;
float: left;
}
#rightpanel {
width: 250px;
float:right;
}
.userdetails {
border: 1px solid #d8dcdc;
-moz-border-radius: 5px;
padding: 10px;
background-color: #eee;
color: #666;
font-size: 12px;
font-weight: bold;
line-height:1.3em;
text-align:right;
}
.userlogin {
border: 1px solid #ccc;
-moz-border-radius: 5px;
padding: 10px;
background-color: #fff;
color: #666;
font-size: 12px;
font-weight: bold;
line-height:1.3em;
margin-top: 10px;
}
.questionsview_userbox {
float: right;
}
.userbox {
padding: 3px;
padding-right: 10px;
padding-left: 10px;
background-color: #eee;
font-size: 10px;
font-weight: bold;
border: 1px solid #ccc;
-moz-border-radius-bottomright:6px;
-moz-border-radius-topleft:6px;
color: #666;
}
.userbox a {
border-bottom: 0px;
}
.questionsview_details {
padding: 3px;
padding-right: 10px;
padding-left: 10px;
background-color: #eee;
font-size: 10px;
font-weight: bold;
border: 1px solid #ccc;
-moz-border-radius-bottomright:6px;
-moz-border-radius-topleft:6px;
color: #666;
float: right;
margin-right: 10px;
}
.questionsview_details a {
border-bottom: 0px;
}
.questionsview_options {
padding: 3px;
padding-right: 10px;
padding-left: 10px;
background-color: #eee;
font-size: 10px;
font-weight: bold;
border: 1px solid #ccc;
-moz-border-radius-bottomright:6px;
-moz-border-radius-topleft:6px;
color: #666;
float: right;
margin-right: 10px;
}
.questionsview_options a {
border-bottom: 0px;
}
pre {
margin-top: 10px;
margin-bottom: 10px;
font-size: 13px;
}
.pagination {
float: left;
padding-top: 7px;
padding-bottom:7px;
margin-left: 20px;
}
.pagination a {
text-decoration: none;
padding: 5px;
border: 1px solid #eee;
margin-right: 4px;
}
.selected {
text-decoration: none;
padding: 5px;
background-color: #eee;
border: 1px solid #eee;
font-weight: bold;
margin-right: 4px;
cursor: pointer;
}
.bottompagination {
border-top: 1px solid #ccc;
padding-top: 10px;
width: 668px;
}
.toppagination {
border-bottom: 1px solid #ccc;
padding-bottom: 10px;
margin-bottom: 10px;
width: 668px;
}
.questionsgrid_toppagination {
padding-bottom: 10px;
padding-top: 10px;
width: 668px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
margin-top: 10px;
margin-bottom: 0px;
}
.questionsgrid_bottompagination {
padding-bottom: 10px;
padding-top: 10px;
width: 668px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
.questionsview_accepted {
padding: 3px;
padding-right: 10px;
padding-left: 10px;
font-size: 10px;
font-weight: bold;
-moz-border-radius-bottomright:6px;
-moz-border-radius-topleft:6px;
float: right;
margin-right: 10px;
border:1px solid #0d9fca;
background-color:#14abd7;
color:#fff;
}
.questionsview_accept {
padding: 3px;
padding-right: 10px;
padding-left: 10px;
font-size: 10px;
font-weight: bold;
-moz-border-radius-bottomright:6px;
-moz-border-radius-topleft:6px;
float: right;
margin-right: 10px;
border:1px solid #6dc900;
background-color: #6dc900;
color:#fff;
cursor: pointer;
}
.questionsview_accept a {
text-decoration: none;
border-bottom: 0px;
color: #fff;
}
.questionsgrid_title a {
font-size: 16px;
font-weight: bold;
border-bottom: 0px;
color: #666;
}
.questionsgrid_description a {
font-size: 14px;
color: #666;
font-weight: normal;
}
.tags_list {
line-height: 1.5em;
border-top:1px solid #ccc;
margin-top: 10px;
padding-top: 10px;
}
.tags_list li {
margin-top: 5px !important;
margin-right: 10px !important;
}
.highlight {
background-color: #d3f6ff;
color: #333;
}
.comments {
clear: both;
padding-top: 20px;
}
.comments a {
font-size: 12px;
font-weight: bold;
color: #14abd7;
text-decoration: none;
border-bottom: 1px dotted #14abd7;
}
.commentsadd {
border-top:1px dotted #ccc;
padding-top: 10px;
width: 580px;
padding-left: 5px;
padding-right: 5px;
}
.commenttextarea {
width: 570px;
border: 1px solid #ccc;
color: #666666;
font-size: 12px;
padding: 3px;
height: 50px;
}
.smallbutton {
border: 1px solid #ccc;
color: #666666;
font-size: 11px;
padding: 2px;
margin-top: 2px;
}
.comment {
border-top:1px dotted #ccc;
padding-top: 5px;
padding-bottom: 5px;
width: 580px;
padding-left: 5px;
padding-right: 5px;
font-size: 12px;
color: #666;
line-height: 1.4em;
}
.comment a {
color: #666;
border-bottom: 1px dotted #666;
}
.viewallcomments {
display:none;
}
.comment_text {
float:left;
width:520px;
padding-right: 10px;
}
.commentfave {
float:left;
font-size:15px;
font-weight:bold;
padding-top:2px;
width:15px;
color:#999;
text-align:center;
cursor: pointer;
}
.commentdel {
float:left;
font-size:15px;
font-weight:bold;
padding-top:1px;
width:15px;
color:#999;
text-align:center;
cursor: pointer;
}
.commentfavevotes {
float:left;
font-size:15px;
font-weight:bold;
padding-top:2px;
width:15px;
color:#ccc;
text-align:left;
}
#alert {
overflow: hidden;
width: 100%;
text-align: center;
position: fixed;
top: 0;
left: 0;
background-color: #d3f6ff;
height: 0;
color: #333;
font: 17px/36px arial, sans-serif;
font-weight: bold;
}
html {
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
/* markdown */
.markdown {
padding-top: 5px;
}
.markdown h1, .markdown h2, .markdown h3, .markdown h4 {
padding-top:7px;
padding-left:0px;
}
.markdown hr {
color: #ccc;
background-color: #ccc;
height: 1px;
border: 0px;
}
.markdown ol, .markdown li {
margin-left: 15px;
}
.markdown blockquotes {
border-left: 1px solid #ccc;
}
.markdown em {
font-style: italic;
}
.questionsgrid_description {
padding-top: 5px;
display: block;
line-height: 1.1em;
}
.markdown {
line-height: 1.2em;
}
.textalert {
border: 1px solid #21a5ca !important;
}
.q {
background-color:#14abd7;
border:1px solid #14abd7;
color:#fff;
margin-left:10px;
}
.kb {
background-color:#d3f6ff;
border:1px solid #d3f6ff;
color:#333;
margin-left:10px;
}
.footer {
width: 940px;
text-align: right;
margin-top: 40px;
padding-right:20px;
padding-top: 10px;
border-top: 1px dotted #ccc;
display: block;
font-family: verdana;
font-size: 10px;
padding-bottom:10px;
line-height:15px;
margin: 0 auto;
}
================================================
FILE: css/prettify.css
================================================
/* Pretty printing styles. Used with prettify.js. */
.str { color: #080; }
.kwd { color: #075c70; }
.com { color: #800; }
.typ { color: #606; }
.lit { color: #066; }
.pun { color: #16bae2; }
.pln { color: #000; }
.tag { color: #008; }
.atn { color: #606; }
.atv { color: #080; }
.dec { color: #606; }
pre.prettyprint { }
@media print {
.str { color: #060; }
.kwd { color: #006; font-weight: bold; }
.com { color: #600; font-style: italic; }
.typ { color: #404; font-weight: bold; }
.lit { color: #044; }
.pun { color: #440; }
.pln { color: #000; }
.tag { color: #006; font-weight: bold; }
.atn { color: #404; }
.atv { color: #060; }
}
================================================
FILE: css/tagscomplete.css
================================================
ul.holder { margin: 0; border: 1px solid #d1dbbd; overflow: hidden; height: auto !important; height: 1%; padding: 4px 5px 0; color: #333;}
*:first-child+html ul.holder { padding-bottom: 2px; } * html ul.holder { padding-bottom: 2px; } /* ie7 and below */
ul.holder li { float: left; list-style-type: none; margin: 0 5px 2px 0; white-space:nowrap;}
ul.holder li.bit-box, ul.holder li.bit-input input { font: 10px "Lucida Grande", "Verdana"; }
ul.holder li.bit-box { -moz-border-radius-topleft: 6px;-moz-border-radius-bottomright: 6px; color:#797953; -webkit-border-radius: 6px; border-radius: 6px; border: 1px solid #d3d4aa; background: #e7e9d1; padding: 1px 5px 2px; }
ul.holder li.bit-box-focus { border-color: #d3d4aa; background: #CAD8F3; color: #fff; }
ul.holder li.bit-input input { width: auto; overflow:visible; margin: 0; border: 0px; outline: 0; } /* no left/right padding here please */
ul.holder li.bit-input input.smallinput { width: 20px; }
#add { border: 1px solid #ccc; width: 550px; margin: 50px; padding: 20px 30px 10px; }
form .holder ol li { list-style-type: none; }
form .holder ol { font: 11px "Lucida Grande", "Verdana"; margin: 0; padding: 0; }
form .holder ol li.input-text { margin-bottom: 10px; list-style-type: none; padding-bottom: 10px; }
form .holder ol li.input-text label { font-weight: bold; cursor: pointer; display: block; font-size: 13px; margin-bottom: 10px; }
form .holder ol li.input-text input { width: 588px; padding: 3px; font: 11px "Lucida Grande", "Verdana"; border: 1px solid #fff; }
form ul.holder { width: 650px; }
form .holder ul { margin: 0 !important }
ul.holder li.bit-box, #apple-list ul.holder li.bit-box { padding-right: 15px; position: relative; z-index:1000;}
#apple-list ul.holder li.bit-input { margin: 0; }
#apple-list ul.holder li.bit-input input.smallinput { width: 5px; }
ul.holder li.bit-hover { background: #BBCEF1; border: 1px solid #6D95E0; }
ul.holder li.bit-box-focus { border-color: #598BEC; background: #ffffff; color: #fff; }
ul.holder li.bit-box a.closebutton { position: absolute; right: 4px; top: 5px; display: block; width: 7px; height: 7px; font-size: 1px; background: url('/qwench/img/close.gif'); }
ul.holder li.bit-box a.closebutton:hover { background-position: 7px; }
ul.holder li.bit-box-focus a.closebutton, ul.holder li.bit-box-focus a.closebutton:hover { background-position: bottom; }
ul a {
border-bottom: 0px;
}
.facebook-auto { display: none; position: absolute; width: 512px; background: #fff; border-bottom: 0px; }
.facebook-auto .default { padding: 5px 7px; border: 1px solid #ccc; border-width: 0 1px 1px;font-family:"Lucida Grande","Verdana"; font-size:11px; }
.facebook-auto ul { display: none; margin: 0; padding: 0; overflow: auto; position:absolute; z-index:9999}
.facebook-auto ul li { padding: 5px 12px; z-index: 1000; cursor: pointer; margin: 0; list-style-type: none; border: 1px solid #ccc; border-width: 0 1px 1px; font: 11px "Lucida Grande", "Verdana"; background-color: #fff }
.facebook-auto ul li em { font-weight: bold; font-style: normal; background: #ccc; }
.facebook-auto ul li.auto-focus { background: #e7e9d1; color: #333; }
.facebook-auto ul li.auto-focus em { background: none; }
.deleted { background-color:#d3d4aa !important; }
.hidden { display:none;}
#demo ul.holder li.bit-input input { padding: 2px 0 1px; border: 1px solid #ccc; }
.ie6fix {height:1px;width:1px; position:absolute;top:0px;left:0px;z-index:1;}
================================================
FILE: css/wmd.css
================================================
.wmd-panel
{
}
#wmd-editor
{
}
#wmd-button-bar
{
width: 100%;
padding-top: 5px;
padding-bottom: 5px;
}
#wmd-input
{
width: 654px;
border: 1px solid #d1dbbd;
color: #666666;
font-size: 15px;
padding: 3px;
height: 300px;
}
#wmd-preview
{
overflow: auto;
background-color: #EFFCFF;
width: 633px;
padding: 15px;
}
#wmd-output
{
background-color: Pink;
}
#wmd-button-row
{
position: relative;
margin-left: 5px;
margin-right: 5px;
margin-bottom: 5px;
margin-top: 10px;
padding: 0px;
height: 20px;
}
.wmd-spacer
{
width: 1px;
height: 20px;
margin-left: 14px;
position: absolute;
background-color: #fff;
display: inline-block;
list-style: none;
}
.wmd-button
{
width: 20px;
height: 20px;
margin-left: 5px;
margin-right: 5px;
position: absolute;
background-image: url(../img/wmd-buttons.png);
background-repeat: no-repeat;
background-position: 0px 0px;
display: inline-block;
list-style: none;
}
.wmd-button > a
{
width: 20px;
height: 20px;
margin-left: 5px;
margin-right: 5px;
position: absolute;
display: inline-block;
}
/* sprite button slicing style information */
#wmd-button-bar #wmd-bold-button {left: 0px; background-position: 0px 0;}
#wmd-button-bar #wmd-italic-button {left: 25px; background-position: -20px 0;}
#wmd-button-bar #wmd-spacer1 {left: 50px;}
#wmd-button-bar #wmd-link-button {left: 75px; background-position: -40px 0;}
#wmd-button-bar #wmd-quote-button {left: 100px; background-position: -60px 0;}
#wmd-button-bar #wmd-code-button {left: 125px; background-position: -80px 0;}
#wmd-button-bar #wmd-image-button {left: 150px; background-position: -100px 0;}
#wmd-button-bar #wmd-spacer2 {left: 175px;}
#wmd-button-bar #wmd-olist-button {left: 200px; background-position: -120px 0;}
#wmd-button-bar #wmd-ulist-button {left: 225px; background-position: -140px 0;}
#wmd-button-bar #wmd-heading-button {left: 250px; background-position: -160px 0;}
#wmd-button-bar #wmd-hr-button {left: 275px; background-position: -180px 0;}
#wmd-button-bar #wmd-spacer3 {left: 300px;}
#wmd-button-bar #wmd-undo-button {left: 325px; background-position: -200px 0;}
#wmd-button-bar #wmd-redo-button {left: 350px; background-position: -220px 0;}
#wmd-button-bar #wmd-help-button {right: 0px; background-position: -240px 0;}
.wmd-prompt-background
{
background-color: Black;
}
.wmd-prompt-dialog
{
border: 1px solid #999999;
background-color: #F5F5F5;
}
.wmd-prompt-dialog > div {
font-size: 0.8em;
font-family: arial, helvetica, sans-serif;
}
.wmd-prompt-dialog > form > input[type="text"] {
border: 1px solid #999999;
color: black;
}
.wmd-prompt-dialog > form > input[type="button"]{
border: 1px solid #888888;
font-family: trebuchet MS, helvetica, sans-serif;
font-size: 0.8em;
font-weight: bold;
}
================================================
FILE: db/1.txt
================================================
-- MySQL dump 10.11
--
-- Host: localhost Database: qwench
-- ------------------------------------------------------
-- Server version 5.0.51b-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `answers`
--
DROP TABLE IF EXISTS `answers`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `answers` (
`id` int(10) unsigned NOT NULL auto_increment,
`questionid` int(10) unsigned NOT NULL,
`description` text character set latin1 NOT NULL,
`created` timestamp NOT NULL default '0000-00-00 00:00:00',
`updated` timestamp NOT NULL default '0000-00-00 00:00:00',
`userid` int(10) unsigned NOT NULL,
`accepted` int(10) unsigned NOT NULL,
`votes` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `answers_votes`
--
DROP TABLE IF EXISTS `answers_votes`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `answers_votes` (
`id` int(10) unsigned NOT NULL auto_increment,
`answerid` int(10) unsigned NOT NULL,
`userid` int(10) unsigned NOT NULL,
`vote` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=72 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `comments`
--
DROP TABLE IF EXISTS `comments`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `comments` (
`id` int(10) unsigned NOT NULL auto_increment,
`type` int(10) unsigned NOT NULL,
`comment` text character set latin1 NOT NULL,
`votes` int(10) unsigned NOT NULL default '0',
`created` timestamp NOT NULL default '0000-00-00 00:00:00',
`userid` int(10) unsigned NOT NULL,
`typeid` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=49 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `comments_votes`
--
DROP TABLE IF EXISTS `comments_votes`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `comments_votes` (
`id` int(10) unsigned NOT NULL auto_increment,
`commentid` int(10) unsigned NOT NULL,
`userid` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `favorites`
--
DROP TABLE IF EXISTS `favorites`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `favorites` (
`id` int(10) unsigned NOT NULL auto_increment,
`questionid` int(10) unsigned NOT NULL,
`userid` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `questions`
--
DROP TABLE IF EXISTS `questions`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `questions` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` text character set latin1 NOT NULL,
`description` text character set latin1 NOT NULL,
`created` timestamp NOT NULL default '0000-00-00 00:00:00',
`updated` timestamp NOT NULL default '0000-00-00 00:00:00',
`link` text character set latin1 NOT NULL,
`userid` int(10) unsigned NOT NULL,
`slug` text character set latin1 NOT NULL,
`linkcache` longtext character set latin1 NOT NULL,
`votes` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
FULLTEXT KEY `title` (`title`,`description`)
) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `questions_votes`
--
DROP TABLE IF EXISTS `questions_votes`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `questions_votes` (
`id` int(10) unsigned NOT NULL auto_increment,
`questionid` int(10) unsigned NOT NULL,
`userid` int(10) unsigned NOT NULL,
`vote` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `tags`
--
DROP TABLE IF EXISTS `tags`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `tags` (
`id` int(10) unsigned NOT NULL auto_increment,
`tag` varchar(255) character set latin1 NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `tags_questions`
--
DROP TABLE IF EXISTS `tags_questions`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `tags_questions` (
`id` int(10) unsigned NOT NULL auto_increment,
`tagid` int(10) unsigned NOT NULL,
`questionid` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=93 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL auto_increment,
`username` varchar(255) character set latin1 NOT NULL,
`password` varchar(255) character set latin1 NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2009-09-11 7:03:59
================================================
FILE: db/2.txt
================================================
ALTER TABLE `users` ADD COLUMN `name` VARCHAR(255) NOT NULL AFTER `password`,
ADD COLUMN `email` VARCHAR(255) NOT NULL AFTER `name`,
ADD COLUMN `points` INTEGER UNSIGNED NOT NULL AFTER `email`,
ADD COLUMN `moderator` INTEGER UNSIGNED NOT NULL AFTER `points`;
ALTER TABLE `users` DROP COLUMN `username`;
ALTER TABLE `users` ADD COLUMN `created` DATETIME NOT NULL AFTER `moderator`,
ADD COLUMN `lastactivity` DATETIME NOT NULL AFTER `created`;
================================================
FILE: db/3.txt
================================================
CREATE TABLE `activities` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` INTEGER UNSIGNED NOT NULL,
`activity` INTEGER UNSIGNED NOT NULL,
`points` INTEGER NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE = MyISAM
CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `questions` ADD COLUMN `accepted` INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER `votes`,
ADD COLUMN `answers` INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER `accepted`,
ADD COLUMN `kb` INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER `answers`;
ALTER TABLE `activities` MODIFY COLUMN `activity` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `activities` ADD COLUMN `created` DATETIME NOT NULL AFTER `points`;
ALTER TABLE `activities` ADD COLUMN `activityid` INTEGER UNSIGNED NOT NULL AFTER `created`;
ALTER TABLE `users` MODIFY COLUMN `points` INTEGER NOT NULL DEFAULT 0;
================================================
FILE: index.php
================================================
<?php
/* Start Session */
session_name("qwench");
session_start();
/* Define */
define('ROOT',DIRNAME(__FILE__));
define('DS',DIRECTORY_SEPARATOR);
/* Get Basic Details */
$path = explode("/", substr($_SERVER['PATH_INFO'],1));
$controller = 'questions';
$action = 'index';
if (empty($_GET['type'])) { $_GET['type'] = "active"; }
$norender = false;
$noheader = false;
if (!empty($path[0])) { $controller = $path[0]; if ($_GET['type'] == "active") { $_GET['type'] = ""; } }
if (!empty($path[1])) { $action = $path[1]; if ($_GET['type'] == "active") { $_GET['type'] = ""; } }
/* Include Libraries */
include_once ROOT.DS.'config.php';
include_once ROOT.DS.'libraries'.DS.'template.class.php';
include_once ROOT.DS.'libraries'.DS.'helper.class.php';
$template = new Template($controller,$action);
$helper = new Helper();
include_once ROOT.DS.'libraries'.DS.'shared.php';
include_once ROOT.DS.'libraries'.DS.'markdown.php';
include_once ROOT.DS.'libraries'.DS.'timeago.php';
include_once ROOT.DS.'libraries'.DS.'score.php';
include_once ROOT.DS.'libraries'.DS.'pagination.class.php';
include_once ROOT.DS.'controllers'.DS.'helpers.php';
/* Check Debug vs Production Mode */
if (DEBUG_MODE == '1')
{
error_reporting(E_ALL);
ini_set('display_errors','On');
}
/* Basic Bootstrapping */
include ROOT.DS.'controllers'.DS.$controller.'.php';
if (function_exists($action)) {
call_user_func($action);
} else {
call_user_func('index');
}
if ($norender == false) {
$template->render($noheader);
}
================================================
FILE: install.php
================================================
<?php
include (dirname(__FILE__))."/config.php";
function db() {
$dbh = mysql_connect(SERVERNAME.':'.SERVERPORT,DBUSERNAME,DBPASSWORD);
return mysql_selectdb(DBNAME,$dbh);
}
$message = 'Database import completed. ';
$errorCount = 0;
/* We cannot assume the use configured the database right.
So lets be sure we can connect to the database first.
*/
if (db() == false)
{
$message = 'Error connecting to the database. <br/> Please edit the config.php file to match you database settings.';
}
else
{
$body = '';
$path = '';
$rollback = 0;
$errors = '';
$content = <<<EOD
DROP TABLE IF EXISTS `activities`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `activities` (
`id` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL,
`activity` varchar(255) NOT NULL default '',
`points` int(11) NOT NULL,
`created` datetime NOT NULL,
`activityid` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `answers`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `answers` (
`id` int(10) unsigned NOT NULL auto_increment,
`questionid` int(10) unsigned NOT NULL,
`description` text character set latin1 NOT NULL,
`created` timestamp NOT NULL default '0000-00-00 00:00:00',
`updated` timestamp NOT NULL default '0000-00-00 00:00:00',
`userid` int(10) unsigned NOT NULL,
`accepted` int(10) unsigned NOT NULL,
`votes` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `answers_votes`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `answers_votes` (
`id` int(10) unsigned NOT NULL auto_increment,
`answerid` int(10) unsigned NOT NULL,
`userid` int(10) unsigned NOT NULL,
`vote` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `comments`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `comments` (
`id` int(10) unsigned NOT NULL auto_increment,
`type` int(10) unsigned NOT NULL,
`comment` text character set latin1 NOT NULL,
`votes` int(10) unsigned NOT NULL default '0',
`created` timestamp NOT NULL default '0000-00-00 00:00:00',
`userid` int(10) unsigned NOT NULL,
`typeid` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `comments_votes`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `comments_votes` (
`id` int(10) unsigned NOT NULL auto_increment,
`commentid` int(10) unsigned NOT NULL,
`userid` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `favorites`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `favorites` (
`id` int(10) unsigned NOT NULL auto_increment,
`questionid` int(10) unsigned NOT NULL,
`userid` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `questions`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `questions` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` text character set latin1 NOT NULL,
`description` text character set latin1 NOT NULL,
`created` timestamp NOT NULL default '0000-00-00 00:00:00',
`updated` timestamp NOT NULL default '0000-00-00 00:00:00',
`link` text character set latin1 NOT NULL,
`userid` int(10) unsigned NOT NULL,
`linkcache` longtext character set latin1 NOT NULL,
`votes` int(11) NOT NULL default '0',
`accepted` int(10) unsigned NOT NULL default '0',
`answers` int(10) unsigned NOT NULL default '0',
`kb` int(10) unsigned NOT NULL default '0',
`slug` text NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `title` (`title`,`description`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `questions_votes`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `questions_votes` (
`id` int(10) unsigned NOT NULL auto_increment,
`questionid` int(10) unsigned NOT NULL,
`userid` int(10) unsigned NOT NULL,
`vote` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `tags`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `tags` (
`id` int(10) unsigned NOT NULL auto_increment,
`tag` varchar(255) character set latin1 NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `tags_questions`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `tags_questions` (
`id` int(10) unsigned NOT NULL auto_increment,
`tagid` int(10) unsigned NOT NULL,
`questionid` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `users`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL auto_increment,
`password` varchar(255) character set latin1 NOT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`points` int(11) NOT NULL default '0',
`moderator` int(10) unsigned NOT NULL,
`created` datetime NOT NULL,
`lastactivity` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
SET character_set_client = @saved_cs_client;
EOD;
$q = preg_split('/;[\r\n]+/',$content);
foreach ($q as $query) {
if (strlen($query) > 4) {
$result = mysql_query($query);
if (!$result) {
$rollback = 1;
$errors .= mysql_error()."<br/>\n";
}
}
}
}
?>
<html>
<head>
<title>Install</title>
<style>
body {
padding:0;
margin:0;
font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
font-size: 14px;
color: #333333;
}
a
{
color: blue;
font-style: italic;
text-decoration: none;
}
</style>
</head>
<body>
<div class="setup"><?php echo $message; ?>
<br/>
<font style="color: red;">Security Alert!!!</font>
<br/>
<strong>Delete the install.php file from your server.</strong>
<br/>
<br/>
<a href="index.php"> Try out your shiny new server. click here
</a>
</div>
</body>
</html>
<?php
unlink(install.php);
?>
================================================
FILE: js/fancyalert.js
================================================
/*
jQuery Fancy Alert
Copyright (c) 2009 Anant Garg (http://anantgarg.com)
Version: 1.0
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
(function($){
$.fancyalert = function(message){
if ($("#alert").length > 0) {
$("#alert").html(message);
} else {
var html = '<div id="alert">'+message+'</div>';
$('body').append(html);
}
$alert = $('#alert');
if($alert.length) {
var alerttimer = window.setTimeout(function () {
$alert.trigger('click');
}, 3000);
$alert.css('border-bottom','2px solid #76e3ff');
$alert.animate({height: $alert.css('line-height') || '50px'}, 200)
.click(function () {
window.clearTimeout(alerttimer);
$alert.animate({height: '0'}, 200);
$alert.css('border-bottom','0px solid #333333');
});
}
};
})(jQuery);
================================================
FILE: js/jquery.js
================================================
/*
* jQuery JavaScript Library v1.3.2
* http://jquery.com/
*
* Copyright (c) 2009 John Resig
* Dual licensed under the MIT and GPL licenses.
* http://docs.jquery.com/License
*
* Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
* Revision: 6246
*/
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
/*
* Sizzle CSS Selector Engine - v0.9.3
* Copyright 2009, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
* More information: http://sizzlejs.com/
*/
(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
================================================
FILE: js/prettify/lang-css.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \t\r\n\f]+/,null," \t\r\n\u000c"]],[["str",/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],["str",/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],["kwd",/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],["com",
/^(?:<!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#(?:[0-9a-f]{3}){1,2}/i],["pln",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],["pun",/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^\)\"\']+/]]),["css-str"]);
================================================
FILE: js/prettify/lang-hs.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:(?:--+(?:[^\r\n\x0C]*)?)|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^a-zA-Z0-9\']|$)/,
null],["pln",/^(?:[A-Z][\w\']*\.)*[a-zA-Z][\w\']*/],["pun",/^[^\t\n\x0B\x0C\r a-zA-Z0-9\'\"]+/]]),["hs"]);
================================================
FILE: js/prettify/lang-lisp.js
================================================
(function(){var a=null;
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(/,a,"("],["clo",/^\)/,a,")"],["com",/^;[^\r\n]*/,a,";"],["pln",/^[\t\n\r \xA0]+/,a,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|cons|defun|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],["lit",/^[+\-]?(?:0x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",
/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["cl","el","lisp","scm"])})()
================================================
FILE: js/prettify/lang-lua.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],["str",/^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^[a-z_]\w*/i],
["pun",/^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\-\+=]*/]]),["lua"]);
================================================
FILE: js/prettify/lang-ml.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
["lit",/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^(?:[a-z_]\w*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],["pun",/^[^\t\n\r \xA0\"\'\w]+/]]),["fs","ml"]);
================================================
FILE: js/prettify/lang-proto.js
================================================
PR.registerLangHandler(PR.sourceDecorator({keywords:"bool bytes default double enum extend extensions false fixed32 fixed64 float group import int32 int64 max message option optional package repeated required returns rpc service sfixed32 sfixed64 sint32 sint64 string syntax to true uint32 uint64",cStyleComments:true}),["proto"]);
================================================
FILE: js/prettify/lang-sql.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],["kwd",/^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i,
null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^[a-z_][\w-]*/i],["pun",/^[^\w\t\n\r \xA0]+/]]),["sql"]);
================================================
FILE: js/prettify/lang-vb.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i,null,'"\u201c\u201d'],["com",/^[\'\u2018\u2019][^\r\n\u2028\u2029]*/,null,"'\u2018\u2019"]],[["kwd",/^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i,
null],["com",/^REM[^\r\n\u2028\u2029]*/i],["lit",/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*\])/i],["pun",/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],["pun",/^(?:\[|\])/]]),["vb","vbs"]);
================================================
FILE: js/prettify/lang-wiki.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t \xA0a-gi-z0-9]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[=*~\^\[\]]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/],["lang-",/^\{\{\{([\s\S]+?)\}\}\}/],["lang-",/^`([^\r\n`]+)`/],["str",/^https?:\/\/[^\/?#\s]*(?:\/[^?#\s]*)?(?:\?[^#\s]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\s\S])[^#=*~^A-Zh\{`\[\r\n]*/]]),["wiki"]);
PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]);
================================================
FILE: js/prettify/prettify.js
================================================
(function(){
var o=true,r=null,z=false;window.PR_SHOULD_USE_CONTINUATION=o;window.PR_TAB_WIDTH=8;window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0;window._pr_isIE6=function(){var N=navigator&&navigator.userAgent&&/\bMSIE 6\./.test(navigator.userAgent);window._pr_isIE6=function(){return N};return N};
var aa="!",ba="!=",ca="!==",F="#",da="%",ea="%=",G="&",fa="&&",ja="&&=",ka="&=",H="(",la="*",ma="*=",na="+=",oa=",",pa="-=",qa="->",ra="/",sa="/=",ta=":",ua="::",va=";",I="<",wa="<<",xa="<<=",ya="<=",za="=",Aa="==",Ba="===",J=">",Ca=">=",Da=">>",Ea=">>=",Fa=">>>",Ga=">>>=",Ha="?",Ia="@",L="[",M="^",Ta="^=",Ua="^^",Va="^^=",Wa="{",O="|",Xa="|=",Ya="||",Za="||=",$a="~",ab="break",bb="case",cb="continue",db="delete",eb="do",fb="else",gb="finally",hb="instanceof",ib="return",jb="throw",kb="try",lb="typeof",
mb="(?:^^|[+-]",nb="\\$1",ob=")\\s*",pb="&",qb="<",rb=">",sb=""",tb="&#",ub="x",vb="'",wb='"',xb=" ",yb="XMP",zb="</",Ab='="',P="",Q="\\",Bb="b",Cb="t",Db="n",Eb="v",Fb="f",Gb="r",Hb="u",Ib="0",Jb="1",Kb="2",Lb="3",Mb="4",Nb="5",Ob="6",Pb="7",Qb="\\x0",Rb="\\x",Sb="-",Tb="]",Ub="\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]",R="g",Vb="\\B",Wb="\\b",Xb="\\D",Yb="\\d",Zb="\\S",$b="\\s",ac="\\W",bc="\\w",cc="(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)",
dc="(?:",ec=")",fc="gi",gc="PRE",hc='<!DOCTYPE foo PUBLIC "foo bar">\n<foo />',ic="\t",jc="\n",kc="[^<]+|<!--[\\s\\S]*?--\>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z][^>]*>|<",lc="nocode",mc=' $1="$2$3$4"',S="pln",nc="string",T="lang-",oc="src",U="str",pc="'\"",qc="'\"`",rc="\"'",V="com",sc="lang-regex",tc="(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)",uc="kwd",vc="^(?:",wc=")\\b",xc=" \r\n\t\u00a0",yc="lit",zc="typ",Ac="0123456789",Y="pun",Bc="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ",
Cc="</span>",Dc='<span class="',Ec='">',Fc="$1 ",Gc=" <br />",Hc="<br />",Ic="console",Jc="cannot override language handler %s",Kc="default-markup",Lc="default-code",Mc="dec",Z="lang-js",$="lang-css",Nc="lang-in.tag",Oc="htm",Pc="html",Qc="mxml",Rc="xhtml",Sc="xml",Tc="xsl",Uc=" \t\r\n",Vc="atv",Wc="tag",Xc="atn",Yc="lang-uq.val",Zc="in.tag",$c="uq.val",ad="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where ",
bd="c",cd="cc",dd="cpp",ed="cxx",fd="cyc",gd="m",hd="null true false",id="json",jd="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
kd="cs",ld="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",md="java",nd="break continue do else for if return while case done elif esac eval fi function in local set then until ",
od="bsh",pd="csh",qd="sh",rd="break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",sd="cv",td="py",ud="caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",vd="perl",wd="pl",xd="pm",yd="break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",
zd="rb",Ad="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try debugger eval export function get null set undefined var with Infinity NaN ",Bd="js",Cd="regex",Dd="pre",Ed="code",Fd="xmp",Gd="prettyprint",Hd="class",Id="br",Jd="\r";
(function(){var N=function(){for(var a=[aa,ba,ca,F,da,ea,G,fa,ja,ka,H,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,I,wa,xa,ya,za,Aa,Ba,J,Ca,Da,Ea,Fa,Ga,Ha,Ia,L,M,Ta,Ua,Va,Wa,O,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb],b=mb,c=0;c<a.length;++c)b+=O+a[c].replace(/([^=<>:&a-z])/g,nb);b+=ob;return b}(),Ja=/&/g,Ka=/</g,La=/>/g,Kd=/\"/g;function Ld(a){return a.replace(Ja,pb).replace(Ka,qb).replace(La,rb).replace(Kd,sb)}function ga(a){return a.replace(Ja,pb).replace(Ka,qb).replace(La,rb)}var Md=/</g,Nd=/>/g,
Od=/'/g,Pd=/"/g,Qd=/&/g,Rd=/ /g;function Sd(a){var b=a.indexOf(G);if(b<0)return a;for(--b;(b=a.indexOf(tb,b+1))>=0;){var c=a.indexOf(va,b);if(c>=0){var d=a.substring(b+3,c),g=10;if(d&&d.charAt(0)===ub){d=d.substring(1);g=16}var i=parseInt(d,g);isNaN(i)||(a=a.substring(0,b)+String.fromCharCode(i)+a.substring(c+1))}}return a.replace(Md,I).replace(Nd,J).replace(Od,vb).replace(Pd,wb).replace(Qd,G).replace(Rd,xb)}function Ma(a){return yb===a.tagName}function W(a,b){switch(a.nodeType){case 1:var c=
a.tagName.toLowerCase();b.push(I,c);for(var d=0;d<a.attributes.length;++d){var g=a.attributes[d];if(g.specified){b.push(xb);W(g,b)}}b.push(J);for(var i=a.firstChild;i;i=i.nextSibling)W(i,b);if(a.firstChild||!/^(?:br|link|img)$/.test(c))b.push(zb,c,J);break;case 2:b.push(a.name.toLowerCase(),Ab,Ld(a.value),wb);break;case 3:case 4:b.push(ga(a.nodeValue));break}}function Na(a){for(var b=0,c=z,d=z,g=0,i=a.length;g<i;++g){var m=a[g];if(m.ignoreCase)d=o;else if(/[a-z]/i.test(m.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,
P))){c=o;d=z;break}}function l(j){if(j.charAt(0)!==Q)return j.charCodeAt(0);switch(j.charAt(1)){case Bb:return 8;case Cb:return 9;case Db:return 10;case Eb:return 11;case Fb:return 12;case Gb:return 13;case Hb:case ub:return parseInt(j.substring(2),16)||j.charCodeAt(1);case Ib:case Jb:case Kb:case Lb:case Mb:case Nb:case Ob:case Pb:return parseInt(j.substring(1),8);default:return j.charCodeAt(1)}}function n(j){if(j<32)return(j<16?Qb:Rb)+j.toString(16);var f=String.fromCharCode(j);if(f===Q||f===Sb||
f===L||f===Tb)f=Q+f;return f}function q(j){for(var f=j.substring(1,j.length-1).match(new RegExp(Ub,R)),s=[],k=[],h=f[0]===M,e=h?1:0,p=f.length;e<p;++e){var t=f[e];switch(t){case Vb:case Wb:case Xb:case Yb:case Zb:case $b:case ac:case bc:s.push(t);continue}var u=l(t),x;if(e+2<p&&Sb===f[e+1]){x=l(f[e+2]);e+=2}else x=u;k.push([u,x]);if(!(x<65||u>122)){x<65||u>90||k.push([Math.max(65,u)|32,Math.min(x,90)|32]);x<97||u>122||k.push([Math.max(97,u)&-33,Math.min(x,122)&-33])}}k.sort(function(Oa,Pa){return Oa[0]-
Pa[0]||Pa[1]-Oa[1]});var B=[],E=[NaN,NaN];for(e=0;e<k.length;++e){var A=k[e];if(A[0]<=E[1]+1)E[1]=Math.max(E[1],A[1]);else B.push(E=A)}var D=[L];h&&D.push(M);D.push.apply(D,s);for(e=0;e<B.length;++e){A=B[e];D.push(n(A[0]));if(A[1]>A[0]){A[1]+1>A[0]&&D.push(Sb);D.push(n(A[1]))}}D.push(Tb);return D.join(P)}function v(j){var f=j.source.match(new RegExp(cc,R)),s=f.length,k=[],h,e=0;for(h=0;e<s;++e){var p=f[e];if(p===H)++h;else if(Q===p.charAt(0)){var t=+p.substring(1);if(t&&t<=h)k[t]=-1}}for(e=1;e<k.length;++e)if(-1===
k[e])k[e]=++b;for(h=e=0;e<s;++e){p=f[e];if(p===H){++h;if(k[h]===undefined)f[e]=dc}else if(Q===p.charAt(0))if((t=+p.substring(1))&&t<=h)f[e]=Q+k[h]}for(h=e=0;e<s;++e)if(M===f[e]&&M!==f[e+1])f[e]=P;if(j.ignoreCase&&c)for(e=0;e<s;++e){p=f[e];var u=p.charAt(0);if(p.length>=2&&u===L)f[e]=q(p);else if(u!==Q)f[e]=p.replace(/[a-zA-Z]/g,function(x){var B=x.charCodeAt(0);return L+String.fromCharCode(B&-33,B|32)+Tb})}return f.join(P)}var w=[];g=0;for(i=a.length;g<i;++g){m=a[g];if(m.global||m.multiline)throw new Error(P+
m);w.push(dc+v(m)+ec)}return new RegExp(w.join(O),d?fc:R)}var ha=r;function Td(a){if(r===ha){var b=document.createElement(gc);b.appendChild(document.createTextNode(hc));ha=!/</.test(b.innerHTML)}if(ha){var c=a.innerHTML;if(Ma(a))c=ga(c);return c}for(var d=[],g=a.firstChild;g;g=g.nextSibling)W(g,d);return d.join(P)}function Ud(a){var b=0;return function(c){for(var d=r,g=0,i=0,m=c.length;i<m;++i){var l=c.charAt(i);switch(l){case ic:d||(d=[]);d.push(c.substring(g,i));var n=a-b%a;for(b+=n;n>=0;n-=" ".length)d.push(" ".substring(0,
n));g=i+1;break;case jc:b=0;break;default:++b}}if(!d)return c;d.push(c.substring(g));return d.join(P)}}var Vd=new RegExp(kc,R),Wd=/^<\!--/,Xd=/^<\[CDATA\[/,Yd=/^<br\b/i,Qa=/^<(\/?)([a-zA-Z]+)/;function Zd(a){var b=a.match(Vd),c=[],d=0,g=[];if(b)for(var i=0,m=b.length;i<m;++i){var l=b[i];if(l.length>1&&l.charAt(0)===I){if(!Wd.test(l))if(Xd.test(l)){c.push(l.substring(9,l.length-3));d+=l.length-12}else if(Yd.test(l)){c.push(jc);++d}else if(l.indexOf(lc)>=0&&$d(l)){var n=l.match(Qa)[2],q=1,v;v=i+1;a:for(;v<
m;++v){var w=b[v].match(Qa);if(w&&w[2]===n)if(w[1]===ra){if(--q===0)break a}else++q}if(v<m){g.push(d,b.slice(i,v+1).join(P));i=v}else g.push(d,l)}else g.push(d,l)}else{var j=Sd(l);c.push(j);d+=j.length}}return{source:c.join(P),tags:g}}function $d(a){return!!a.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,mc).match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)}function ia(a,b,c,d){if(b){var g={source:b,b:a};c(g);d.push.apply(d,g.c)}}function K(a,b){var c={},d;(function(){for(var m=a.concat(b),
l=[],n={},q=0,v=m.length;q<v;++q){var w=m[q],j=w[3];if(j)for(var f=j.length;--f>=0;)c[j.charAt(f)]=w;var s=w[1],k=P+s;if(!n.hasOwnProperty(k)){l.push(s);n[k]=r}}l.push(/[\0-\uffff]/);d=Na(l)})();var g=b.length,i=function(m){for(var l=m.source,n=m.b,q=[n,S],v=0,w=l.match(d)||[],j={},f=0,s=w.length;f<s;++f){var k=w[f],h=j[k],e,p;if(typeof h===nc)p=z;else{var t=c[k.charAt(0)];if(t){e=k.match(t[1]);h=t[0]}else{for(var u=0;u<g;++u){t=b[u];if(e=k.match(t[1])){h=t[0];break}}e||(h=S)}if((p=h.length>=5&&T===
h.substring(0,5))&&!(e&&e[1])){p=z;h=oc}p||(j[k]=h)}var x=v;v+=k.length;if(p){var B=e[1],E=k.indexOf(B),A=E+B.length,D=h.substring(5);ia(n+x,k.substring(0,E),i,q);ia(n+x+E,B,Ra(D,B),q);ia(n+x+A,k.substring(A),i,q)}else q.push(n+x,h)}m.c=q};return i}function C(a){var b=[],c=[];if(a.tripleQuotedStrings)b.push([U,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,r,pc]);
else a.multiLineStrings?b.push([U,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,r,qc]):b.push([U,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,r,rc]);if(a.hashComments)a.cStyleComments?b.push([V,/^#(?:[^\r\n\/]|\/(?!\*)|\/\*[^\r\n]*?\*\/)*/,r,F]):b.push([V,/^#[^\r\n]*/,r,F]);if(a.cStyleComments){c.push([V,/^\/\/[^\r\n]*/,r]);c.push([V,/^\/\*[\s\S]*?(?:\*\/|$)/,r])}a.regexLiterals&&c.push([sc,new RegExp(M+N+tc)]);var d=
a.keywords.replace(/^\s+|\s+$/g,P);d.length&&c.push([uc,new RegExp(vc+d.replace(/\s+/g,O)+wc),r]);b.push([S,/^\s+/,r,xc]);c.push([yc,/^@[a-z_$][a-z_$@0-9]*/i,r,Ia],[zc,/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/,r],[S,/^[a-z_$][a-z_$@0-9]*/i,r],[yc,/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,r,Ac],[Y,/^.[^\s\w\.$@\'\"\`\/\#]*/,r]);return K(b,c)}var ae=C({keywords:Bc,hashComments:o,cStyleComments:o,multiLineStrings:o,regexLiterals:o});function be(a){var b=a.source,c=a.f,d=a.c,
g=[],i=0,m=r,l=r,n=0,q=0,v=Ud(window.PR_TAB_WIDTH),w=/([\r\n ]) /g,j=/(^| ) /gm,f=/\r\n?|\n/g,s=/[ \r\n]$/,k=o;function h(p){if(p>i){if(m&&m!==l){g.push(Cc);m=r}if(!m&&l){m=l;g.push(Dc,m,Ec)}var t=ga(v(b.substring(i,p))).replace(k?j:w,Fc);k=s.test(t);var u=window._pr_isIE6()?Gc:Hc;g.push(t.replace(f,u));i=p}}for(;1;){var e;if(e=n<c.length?q<d.length?c[n]<=d[q]:o:z){h(c[n]);if(m){g.push(Cc);m=r}g.push(c[n+1]);n+=2}else if(q<d.length){h(d[q]);l=d[q+1];q+=2}else break}h(b.length);m&&g.push(Cc);a.a=g.join(P)}
var X={};function y(a,b){for(var c=b.length;--c>=0;){var d=b[c];if(X.hasOwnProperty(d))Ic in window&&console.i(Jc,d);else X[d]=a}}function Ra(a,b){a&&X.hasOwnProperty(a)||(a=/^\s*</.test(b)?Kc:Lc);return X[a]}y(ae,[Lc]);y(K([],[[S,/^[^<?]+/],[Mc,/^<!\w[^>]*(?:>|$)/],[V,/^<\!--[\s\S]*?(?:-\->|$)/],[T,/^<\?([\s\S]+?)(?:\?>|$)/],[T,/^<%([\s\S]+?)(?:%>|$)/],[Y,/^(?:<[%?]|[%?]>)/],[T,/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],[Z,/^<script\b[^>]*>([\s\S]+?)<\/script\b[^>]*>/i],[$,/^<style\b[^>]*>([\s\S]+?)<\/style\b[^>]*>/i],
[Nc,/^(<\/?[a-z][^<>]*>)/i]]),[Kc,Oc,Pc,Qc,Rc,Sc,Tc]);y(K([[S,/^[\s]+/,r,Uc],[Vc,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,r,rc]],[[Wc,/^^<\/?[a-z](?:[\w:-]*\w)?|\/?>$/],[Xc,/^(?!style\b|on)[a-z](?:[\w:-]*\w)?/],[Yc,/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Y,/^[=<>\/]+/],[Z,/^on\w+\s*=\s*\"([^\"]+)\"/i],[Z,/^on\w+\s*=\s*\'([^\']+)\'/i],[Z,/^on\w+\s*=\s*([^\"\'>\s]+)/i],[$,/^sty\w+\s*=\s*\"([^\"]+)\"/i],[$,/^sty\w+\s*=\s*\'([^\']+)\'/i],[$,/^sty\w+\s*=\s*([^\"\'>\s]+)/i]]),[Zc]);y(K([],[[Vc,/^[\s\S]+/]]),
[$c]);y(C({keywords:ad,hashComments:o,cStyleComments:o}),[bd,cd,dd,ed,fd,gd]);y(C({keywords:hd}),[id]);y(C({keywords:jd,hashComments:o,cStyleComments:o}),[kd]);y(C({keywords:ld,cStyleComments:o}),[md]);y(C({keywords:nd,hashComments:o,multiLineStrings:o}),[od,pd,qd]);y(C({keywords:rd,hashComments:o,multiLineStrings:o,tripleQuotedStrings:o}),[sd,td]);y(C({keywords:ud,hashComments:o,multiLineStrings:o,regexLiterals:o}),[vd,wd,xd]);y(C({keywords:yd,hashComments:o,multiLineStrings:o,regexLiterals:o}),
[zd]);y(C({keywords:Ad,cStyleComments:o,regexLiterals:o}),[Bd]);y(K([],[[U,/^[\s\S]+/]]),[Cd]);function Sa(a){var b=a.e,c=a.d;a.a=b;try{var d=Zd(b),g=d.source;a.source=g;a.b=0;a.f=d.tags;Ra(c,g)(a);be(a)}catch(i){if(Ic in window){console.log(i);console.h()}}}function ce(a,b){var c={e:a,d:b};Sa(c);return c.a}function de(a){for(var b=window._pr_isIE6(),c=[document.getElementsByTagName(Dd),document.getElementsByTagName(Ed),document.getElementsByTagName(Fd)],d=[],g=0;g<c.length;++g)for(var i=0,m=c[g].length;i<
m;++i)d.push(c[g][i]);c=r;var l=Date;l.now||(l={now:function(){return(new Date).getTime()}});var n=0,q;function v(){for(var j=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;n<d.length&&l.now()<j;n++){var f=d[n];if(f.className&&f.className.indexOf(Gd)>=0){var s=f.className.match(/\blang-(\w+)\b/);if(s)s=s[1];for(var k=z,h=f.parentNode;h;h=h.parentNode)if((h.tagName===Dd||h.tagName===Ed||h.tagName===Fd)&&h.className&&h.className.indexOf(Gd)>=0){k=o;break}if(!k){var e=Td(f);e=e.replace(/(?:\r\n?|\n)$/,
P);q={e:e,d:s,g:f};Sa(q);w()}}}if(n<d.length)setTimeout(v,250);else a&&a()}function w(){var j=q.a;if(j){var f=q.g;if(Ma(f)){for(var s=document.createElement(gc),k=0;k<f.attributes.length;++k){var h=f.attributes[k];if(h.specified){var e=h.name.toLowerCase();if(e===Hd)s.className=h.value;else s.setAttribute(h.name,h.value)}}s.innerHTML=j;f.parentNode.replaceChild(s,f);f=s}else f.innerHTML=j;if(b&&f.tagName===gc)for(var p=f.getElementsByTagName(Id),t=p.length;--t>=0;){var u=p[t];u.parentNode.replaceChild(document.createTextNode(Jd),
u)}}}v()}window.PR_normalizedHtml=W;window.prettyPrintOne=ce;window.prettyPrint=de;window.PR={combinePrefixPatterns:Na,createSimpleLexer:K,registerLangHandler:y,sourceDecorator:C,PR_ATTRIB_NAME:Xc,PR_ATTRIB_VALUE:Vc,PR_COMMENT:V,PR_DECLARATION:Mc,PR_KEYWORD:uc,PR_LITERAL:yc,PR_NOCODE:lc,PR_PLAIN:S,PR_PUNCTUATION:Y,PR_SOURCE:oc,PR_STRING:U,PR_TAG:Wc,PR_TYPE:zc}})();
})()
================================================
FILE: js/showdown.js
================================================
//
// showdown.js -- A javascript port of Markdown.
//
// Copyright (c) 2007 John Fraser.
//
// Original Markdown Copyright (c) 2004-2005 John Gruber
// <http://daringfireball.net/projects/markdown/>
//
// The full source distribution is at:
//
// A A L
// T C A
// T K B
//
// <http://www.attacklab.net/>
//
//
// Wherever possible, Showdown is a straight, line-by-line port
// of the Perl version of Markdown.
//
// This is not a normal parser design; it's basically just a
// series of string substitutions. It's hard to read and
// maintain this way, but keeping Showdown close to the original
// design makes it easier to port new features.
//
// More importantly, Showdown behaves like markdown.pl in most
// edge cases. So web applications can do client-side preview
// in Javascript, and then build identical HTML on the server.
//
// This port needs the new RegExp functionality of ECMA 262,
// 3rd Edition (i.e. Javascript 1.5). Most modern web browsers
// should do fine. Even with the new regular expression features,
// We do a lot of work to emulate Perl's regex functionality.
// The tricky changes in this file mostly have the "attacklab:"
// label. Major or self-explanatory changes don't.
//
// Smart diff tools like Araxis Merge will be able to match up
// this file with markdown.pl in a useful way. A little tweaking
// helps: in a copy of markdown.pl, replace "#" with "//" and
// replace "$text" with "text". Be sure to ignore whitespace
// and line endings.
//
//
// Showdown usage:
//
// var text = "Markdown *rocks*.";
//
// var converter = new Attacklab.showdown.converter();
// var html = converter.makeHtml(text);
//
// alert(html);
//
// Note: move the sample code to the bottom of this
// file before uncommenting it.
//
//
// Attacklab namespace
//
var Attacklab = Attacklab || {}
//
// Showdown namespace
//
Attacklab.showdown = Attacklab.showdown || {}
//
// converter
//
// Wraps all "globals" so that the only thing
// exposed is makeHtml().
//
Attacklab.showdown.converter = function() {
//
// Globals:
//
// Global hashes, used by various utility routines
var g_urls;
var g_titles;
var g_html_blocks;
// Used to track when we're inside an ordered or unordered list
// (see _ProcessListItems() for details):
var g_list_level = 0;
this.makeHtml = function(text) {
//
// Main function. The order in which other subs are called here is
// essential. Link and image substitutions need to happen before
// _EscapeSpecialCharsWithinTagAttributes(), so that any *'s or _'s in the <a>
// and <img> tags get encoded.
//
// Clear the global hashes. If we don't clear these, you get conflicts
// from other articles when generating a page which contains more than
// one article (e.g. an index page that shows the N most recent
// articles):
g_urls = new Array();
g_titles = new Array();
g_html_blocks = new Array();
// attacklab: Replace ~ with ~T
// This lets us use tilde as an escape char to avoid md5 hashes
// The choice of character is arbitray; anything that isn't
// magic in Markdown will work.
text = text.replace(/~/g,"~T");
// attacklab: Replace $ with ~D
// RegExp interprets $ as a special character
// when it's in a replacement string
text = text.replace(/\$/g,"~D");
// Standardize line endings
text = text.replace(/\r\n/g,"\n"); // DOS to Unix
text = text.replace(/\r/g,"\n"); // Mac to Unix
// Make sure text begins and ends with a couple of newlines:
text = "\n\n" + text + "\n\n";
// Convert all tabs to spaces.
text = _Detab(text);
// Strip any lines consisting only of spaces and tabs.
// This makes subsequent regexen easier to write, because we can
// match consecutive blank lines with /\n+/ instead of something
// contorted like /[ \t]*\n+/ .
text = text.replace(/^[ \t]+$/mg,"");
// Turn block-level HTML blocks into hash entries
text = _HashHTMLBlocks(text);
// Strip link definitions, store in hashes.
text = _StripLinkDefinitions(text);
text = _RunBlockGamut(text);
text = _UnescapeSpecialChars(text);
// attacklab: Restore dollar signs
text = text.replace(/~D/g,"$$");
// attacklab: Restore tildes
text = text.replace(/~T/g,"~");
return text;
}
var _StripLinkDefinitions = function(text) {
//
// Strips link definitions from text, stores the URLs and titles in
// hash references.
//
// Link defs are in the form: ^[id]: url "optional title"
/*
var text = text.replace(/
^[ ]{0,3}\[(.+)\]: // id = $1 attacklab: g_tab_width - 1
[ \t]*
\n? // maybe *one* newline
[ \t]*
<?(\S+?)>? // url = $2
[ \t]*
\n? // maybe one newline
[ \t]*
(?:
(\n*) // any lines skipped = $3 attacklab: lookbehind removed
["(]
(.+?) // title = $4
[")]
[ \t]*
)? // title is optional
(?:\n+|$)
/gm,
function(){...});
*/
var text = text.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,
function (wholeMatch,m1,m2,m3,m4) {
m1 = m1.toLowerCase();
g_urls[m1] = _EncodeAmpsAndAngles(m2); // Link IDs are case-insensitive
if (m3) {
// Oops, found blank lines, so it's not a title.
// Put back the parenthetical statement we stole.
return m3+m4;
} else if (m4) {
g_titles[m1] = m4.replace(/"/g,""");
}
// Completely remove the definition from the text
return "";
}
);
return text;
}
var _HashHTMLBlocks = function(text) {
// attacklab: Double up blank lines to reduce lookaround
text = text.replace(/\n/g,"\n\n");
// Hashify HTML blocks:
// We only want to do this for block-level HTML tags, such as headers,
// lists, and tables. That's because we still want to wrap <p>s around
// "paragraphs" that are wrapped in non-block-level tags, such as anchors,
// phrase emphasis, and spans. The list of tags we're looking for is
// hard-coded:
var block_tags_a = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del"
var block_tags_b = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math"
// First, look for nested blocks, e.g.:
// <div>
// <div>
// tags for inner block must be indented.
// </div>
// </div>
//
// The outermost tags must start at the left margin for this to match, and
// the inner nested divs must be indented.
// We need to do this before the next, more liberal match, because the next
// match will start at the first `<div>` and stop at the first `</div>`.
// attacklab: This regex can be expensive when it fails.
/*
var text = text.replace(/
( // save in $1
^ // start of line (with /m)
<($block_tags_a) // start tag = $2
\b // word break
// attacklab: hack around khtml/pcre bug...
[^\r]*?\n // any number of lines, minimally matching
</\2> // the matching end tag
[ \t]* // trailing spaces/tabs
(?=\n+) // followed by a newline
) // attacklab: there are sentinel newlines at end of document
/gm,function(){...}};
*/
text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,hashElement);
//
// Now match more liberally, simply from `\n<tag>` to `</tag>\n`
//
/*
var text = text.replace(/
( // save in $1
^ // start of line (with /m)
<($block_tags_b) // start tag = $2
\b // word break
// attacklab: hack around khtml/pcre bug...
[^\r]*? // any number of lines, minimally matching
.*</\2> // the matching end tag
[ \t]* // trailing spaces/tabs
(?=\n+) // followed by a newline
) // attacklab: there are sentinel newlines at end of document
/gm,function(){...}};
*/
text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,hashElement);
// Special case just for <hr />. It was easier to make a special case than
// to make the other regex more complicated.
/*
text = text.replace(/
( // save in $1
\n\n // Starting after a blank line
[ ]{0,3}
(<(hr) // start tag = $2
\b // word break
([^<>])*? //
\/?>) // the matching end tag
[ \t]*
(?=\n{2,}) // followed by a blank line
)
/g,hashElement);
*/
text = text.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,hashElement);
// Special case for standalone HTML comments:
/*
text = text.replace(/
( // save in $1
\n\n // Starting after a blank line
[ ]{0,3} // attacklab: g_tab_width - 1
<!
(--[^\r]*?--\s*)+
>
[ \t]*
(?=\n{2,}) // followed by a blank line
)
/g,hashElement);
*/
text = text.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,hashElement);
// PHP and ASP-style processor instructions (<?...?> and <%...%>)
/*
text = text.replace(/
(?:
\n\n // Starting after a blank line
)
( // save in $1
[ ]{0,3} // attacklab: g_tab_width - 1
(?:
<([?%]) // $2
[^\r]*?
\2>
)
[ \t]*
(?=\n{2,}) // followed by a blank line
)
/g,hashElement);
*/
text = text.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,hashElement);
// attacklab: Undo double lines (see comment at top of this function)
text = text.replace(/\n\n/g,"\n");
return text;
}
var hashElement = function(wholeMatch,m1) {
var blockText = m1;
// Undo double lines
blockText = blockText.replace(/\n\n/g,"\n");
blockText = blockText.replace(/^\n/,"");
// strip trailing blank lines
blockText = blockText.replace(/\n+$/g,"");
// Replace the element text with a marker ("~KxK" where x is its key)
blockText = "\n\n~K" + (g_html_blocks.push(blockText)-1) + "K\n\n";
return blockText;
};
var _RunBlockGamut = function(text) {
//
// These are all the transformations that form block-level
// tags like paragraphs, headers, and list items.
//
text = _DoHeaders(text);
// Do Horizontal Rules:
var key = hashBlock("<hr />");
text = text.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,key);
text = text.replace(/^[ ]{0,2}([ ]?-[ ]?){3,}[ \t]*$/gm,key);
text = text.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm,key);
text = _DoLists(text);
text = _DoCodeBlocks(text);
text = _DoBlockQuotes(text);
// We already ran _HashHTMLBlocks() before, in Markdown(), but that
// was to escape raw HTML in the original Markdown source. This time,
// we're escaping the markup we've just created, so that we don't wrap
// <p> tags around block-level tags.
text = _HashHTMLBlocks(text);
text = _FormParagraphs(text);
return text;
}
var _RunSpanGamut = function(text) {
//
// These are all the transformations that occur *within* block-level
// tags like paragraphs, headers, and list items.
//
text = _DoCodeSpans(text);
text = _EscapeSpecialCharsWithinTagAttributes(text);
text = _EncodeBackslashEscapes(text);
// Process anchor and image tags. Images must come first,
// because ![foo][f] looks like an anchor.
text = _DoImages(text);
text = _DoAnchors(text);
// Make links out of things like `<http://example.com/>`
// Must come after _DoAnchors(), because you can use < and >
// delimiters in inline links like [this](<url>).
text = _DoAutoLinks(text);
text = _EncodeAmpsAndAngles(text);
text = _DoItalicsAndBold(text);
// Do hard breaks:
text = text.replace(/ +\n/g," <br />\n");
return text;
}
var _EscapeSpecialCharsWithinTagAttributes = function(text) {
//
// Within tags -- meaning between < and > -- encode [\ ` * _] so they
// don't conflict with their use in Markdown for code, italics and strong.
//
// Build a regex to find HTML tags and comments. See Friedl's
// "Mastering Regular Expressions", 2nd Ed., pp. 200-201.
var regex = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;
text = text.replace(regex, function(wholeMatch) {
var tag = wholeMatch.replace(/(.)<\/?code>(?=.)/g,"$1`");
tag = escapeCharacters(tag,"\\`*_");
return tag;
});
return text;
}
var _DoAnchors = function(text) {
//
// Turn Markdown link shortcuts into XHTML <a> tags.
//
//
// First, handle reference-style links: [link text] [id]
//
/*
text = text.replace(/
( // wrap whole match in $1
\[
(
(?:
\[[^\]]*\] // allow brackets nested one level
|
[^\[] // or anything else
)*
)
\]
[ ]? // one optional space
(?:\n[ ]*)? // one optional newline followed by spaces
\[
(.*?) // id = $3
\]
)()()()() // pad remaining backreferences
/g,_DoAnchors_callback);
*/
text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,writeAnchorTag);
//
// Next, inline-style links: [link text](url "optional title")
//
/*
text = text.replace(/
( // wrap whole match in $1
\[
(
(?:
\[[^\]]*\] // allow brackets nested one level
|
[^\[\]] // or anything else
)
)
\]
\( // literal paren
[ \t]*
() // no id, so leave $3 empty
<?(.*?)>? // href = $4
[ \t]*
( // $5
(['"]) // quote char = $6
(.*?) // Title = $7
\6 // matching quote
[ \t]* // ignore any spaces/tabs between closing quote and )
)? // title is optional
\)
)
/g,writeAnchorTag);
*/
text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,writeAnchorTag);
//
// Last, handle reference-style shortcuts: [link text]
// These must come last in case you've also got [link test][1]
// or [link test](/foo)
//
/*
text = text.replace(/
( // wrap whole match in $1
\[
([^\[\]]+) // link text = $2; can't contain '[' or ']'
\]
)()()()()() // pad rest of backreferences
/g, writeAnchorTag);
*/
text = text.replace(/(\[([^\[\]]+)\])()()()()()/g, writeAnchorTag);
return text;
}
var writeAnchorTag = function(wholeMatch,m1,m2,m3,m4,m5,m6,m7) {
if (m7 == undefined) m7 = "";
var whole_match = m1;
var link_text = m2;
var link_id = m3.toLowerCase();
var url = m4;
var title = m7;
if (url == "") {
if (link_id == "") {
// lower-case and turn embedded newlines into spaces
link_id = link_text.toLowerCase().replace(/ ?\n/g," ");
}
url = "#"+link_id;
if (g_urls[link_id] != undefined) {
url = g_urls[link_id];
if (g_titles[link_id] != undefined) {
title = g_titles[link_id];
}
}
else {
if (whole_match.search(/\(\s*\)$/m)>-1) {
// Special case for explicit empty url
url = "";
} else {
return whole_match;
}
}
}
url = escapeCharacters(url,"*_");
var result = "<a href=\"" + url + "\"";
if (title != "") {
title = title.replace(/"/g,""");
title = escapeCharacters(title,"*_");
result += " title=\"" + title + "\"";
}
result += ">" + link_text + "</a>";
return result;
}
var _DoImages = function(text) {
//
// Turn Markdown image shortcuts into <img> tags.
//
//
// First, handle reference-style labeled images: ![alt text][id]
//
/*
text = text.replace(/
( // wrap whole match in $1
!\[
(.*?) // alt text = $2
\]
[ ]? // one optional space
(?:\n[ ]*)? // one optional newline followed by spaces
\[
(.*?) // id = $3
\]
)()()()() // pad rest of backreferences
/g,writeImageTag);
*/
text = text.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,writeImageTag);
//
// Next, handle inline images: 
// Don't forget: encode * and _
/*
text = text.replace(/
( // wrap whole match in $1
!\[
(.*?) // alt text = $2
\]
\s? // One optional whitespace character
\( // literal paren
[ \t]*
() // no id, so leave $3 empty
<?(\S+?)>? // src url = $4
[ \t]*
( // $5
(['"]) // quote char = $6
(.*?) // title = $7
\6 // matching quote
[ \t]*
)? // title is optional
\)
)
/g,writeImageTag);
*/
text = text.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,writeImageTag);
return text;
}
var writeImageTag = function(wholeMatch,m1,m2,m3,m4,m5,m6,m7) {
var whole_match = m1;
var alt_text = m2;
var link_id = m3.toLowerCase();
var url = m4;
var title = m7;
if (!title) title = "";
if (url == "") {
if (link_id == "") {
// lower-case and turn embedded newlines into spaces
link_id = alt_text.toLowerCase().replace(/ ?\n/g," ");
}
url = "#"+link_id;
if (g_urls[link_id] != undefined) {
url = g_urls[link_id];
if (g_titles[link_id] != undefined) {
title = g_titles[link_id];
}
}
else {
return whole_match;
}
}
alt_text = alt_text.replace(/"/g,""");
url = escapeCharacters(url,"*_");
var result = "<img src=\"" + url + "\" alt=\"" + alt_text + "\"";
// attacklab: Markdown.pl adds empty title attributes to images.
// Replicate this bug.
//if (title != "") {
title = title.replace(/"/g,""");
title = escapeCharacters(title,"*_");
result += " title=\"" + title + "\"";
//}
result += " />";
return result;
}
var _DoHeaders = function(text) {
// Setext-style headers:
// Header 1
// ========
//
// Header 2
// --------
//
text = text.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,
function(wholeMatch,m1){return hashBlock("<h1>" + _RunSpanGamut(m1) + "</h1>");});
text = text.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,
function(matchFound,m1){return hashBlock("<h2>" + _RunSpanGamut(m1) + "</h2>");});
// atx-style headers:
// # Header 1
// ## Header 2
// ## Header 2 with closing hashes ##
// ...
// ###### Header 6
//
/*
text = text.replace(/
^(\#{1,6}) // $1 = string of #'s
[ \t]*
(.+?) // $2 = Header text
[ \t]*
\#* // optional closing #'s (not counted)
\n+
/gm, function() {...});
*/
text = text.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,
function(wholeMatch,m1,m2) {
var h_level = m1.length;
return hashBlock("<h" + h_level + ">" + _RunSpanGamut(m2) + "</h" + h_level + ">");
});
return text;
}
// This declaration keeps Dojo compressor from outputting garbage:
var _ProcessListItems;
var _DoLists = function(text) {
//
// Form HTML ordered (numbered) and unordered (bulleted) lists.
//
// attacklab: add sentinel to hack around khtml/safari bug:
// http://bugs.webkit.org/show_bug.cgi?id=11231
text += "~0";
// Re-usable pattern to match any entirel ul or ol list:
/*
var whole_list = /
( // $1 = whole list
( // $2
[ ]{0,3} // attacklab: g_tab_width - 1
([*+-]|\d+[.]) // $3 = first list item marker
[ \t]+
)
[^\r]+?
( // $4
~0 // sentinel for workaround; should be $
|
\n{2,}
(?=\S)
(?! // Negative lookahead for another list item marker
[ \t]*
(?:[*+-]|\d+[.])[ \t]+
)
)
)/g
*/
var whole_list = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
if (g_list_level) {
text = text.replace(whole_list,function(wholeMatch,m1,m2) {
var list = m1;
var list_type = (m2.search(/[*+-]/g)>-1) ? "ul" : "ol";
// Turn double returns into triple returns, so that we can make a
// paragraph for the last item in a list, if necessary:
list = list.replace(/\n{2,}/g,"\n\n\n");;
var result = _ProcessListItems(list);
// Trim any trailing whitespace, to put the closing `</$list_type>`
// up on the preceding line, to get it past the current stupid
// HTML block parser. This is a hack to work around the terrible
// hack that is the HTML block parser.
result = result.replace(/\s+$/,"");
result = "<"+list_type+">" + result + "</"+list_type+">\n";
return result;
});
} else {
whole_list = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g;
text = text.replace(whole_list,function(wholeMatch,m1,m2,m3) {
var runup = m1;
var list = m2;
var list_type = (m3.search(/[*+-]/g)>-1) ? "ul" : "ol";
// Turn double returns into triple returns, so that we can make a
// paragraph for the last item in a list, if necessary:
var list = list.replace(/\n{2,}/g,"\n\n\n");;
var result = _ProcessListItems(list);
result = runup + "<"+list_type+">\n" + result + "</"+list_type+">\n";
return result;
});
}
// attacklab: strip sentinel
text = text.replace(/~0/,"");
return text;
}
_ProcessListItems = function(list_str) {
//
// Process the contents of a single ordered or unordered list, splitting it
// into individual list items.
//
// The $g_list_level global keeps track of when we're inside a list.
// Each time we enter a list, we increment it; when we leave a list,
// we decrement. If it's zero, we're not in a list anymore.
//
// We do this because when we're not inside a list, we want to treat
// something like this:
//
// I recommend upgrading to version
// 8. Oops, now this line is treated
// as a sub-list.
//
// As a single paragraph, despite the fact that the second line starts
// with a digit-period-space sequence.
//
// Whereas when we're inside a list (or sub-list), that line will be
// treated as the start of a sub-list. What a kludge, huh? This is
// an aspect of Markdown's syntax that's hard to parse perfectly
// without resorting to mind-reading. Perhaps the solution is to
// change the syntax rules such that sub-lists must start with a
// starting cardinal number; e.g. "1." or "a.".
g_list_level++;
// trim trailing blank lines:
list_str = list_str.replace(/\n{2,}$/,"\n");
// attacklab: add sentinel to emulate \z
list_str += "~0";
/*
list_str = list_str.replace(/
(\n)? // leading line = $1
(^[ \t]*) // leading whitespace = $2
([*+-]|\d+[.]) [ \t]+ // list marker = $3
([^\r]+? // list item text = $4
(\n{1,2}))
(?= \n* (~0 | \2 ([*+-]|\d+[.]) [ \t]+))
/gm, function(){...});
*/
list_str = list_str.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,
function(wholeMatch,m1,m2,m3,m4){
var item = m4;
var leading_line = m1;
var leading_space = m2;
if (leading_line || (item.search(/\n{2,}/)>-1)) {
item = _RunBlockGamut(_Outdent(item));
}
else {
// Recursion for sub-lists:
item = _DoLists(_Outdent(item));
item = item.replace(/\n$/,""); // chomp(item)
item = _RunSpanGamut(item);
}
return "<li>" + item + "</li>\n";
}
);
// attacklab: strip sentinel
list_str = list_str.replace(/~0/g,"");
g_list_level--;
return list_str;
}
var _DoCodeBlocks = function(text) {
//
// Process Markdown `<pre><code>` blocks.
//
/*
text = text.replace(text,
/(?:\n\n|^)
( // $1 = the code block -- one or more lines, starting with a space/tab
(?:
(?:[ ]{4}|\t) // Lines must start with a tab or a tab-width of spaces - attacklab: g_tab_width
.*\n+
)+
)
(\n*[ ]{0,3}[^ \t\n]|(?=~0)) // attacklab: g_tab_width
/g,function(){...});
*/
// attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
text += "~0";
text = text.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,
function(wholeMatch,m1,m2) {
var codeblock = m1;
var nextChar = m2;
codeblock = _EncodeCode( _Outdent(codeblock));
codeblock = _Detab(codeblock);
codeblock = codeblock.replace(/^\n+/g,""); // trim leading newlines
codeblock = codeblock.replace(/\n+$/g,""); // trim trailing whitespace
codeblock = "<pre><code>" + codeblock + "\n</code></pre>";
return hashBlock(codeblock) + nextChar;
}
);
// attacklab: strip sentinel
text = text.replace(/~0/,"");
return text;
}
var hashBlock = function(text) {
text = text.replace(/(^\n+|\n+$)/g,"");
return "\n\n~K" + (g_html_blocks.push(text)-1) + "K\n\n";
}
var _DoCodeSpans = function(text) {
//
// * Backtick quotes are used for <code></code> spans.
//
// * You can use multiple backticks as the delimiters if you want to
// include literal backticks in the code span. So, this input:
//
// Just type ``foo `bar` baz`` at the prompt.
//
// Will translate to:
//
// <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
//
// There's no arbitrary limit to the number of backticks you
// can use as delimters. If you need three consecutive backticks
// in your code, use four for delimiters, etc.
//
// * You can use spaces to get literal backticks at the edges:
//
// ... type `` `bar` `` ...
//
// Turns to:
//
// ... type <code>`bar`</code> ...
//
/*
text = text.replace(/
(^|[^\\]) // Character before opening ` can't be a backslash
(`+) // $2 = Opening run of `
( // $3 = The code block
[^\r]*?
[^`] // attacklab: work around lack of lookbehind
)
\2 // Matching closer
(?!`)
/gm, function(){...});
*/
text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
function(wholeMatch,m1,m2,m3,m4) {
var c = m3;
c = c.replace(/^([ \t]*)/g,""); // leading whitespace
c = c.replace(/[ \t]*$/g,""); // trailing whitespace
c = _EncodeCode(c);
return m1+"<code>"+c+"</code>";
});
return text;
}
var _EncodeCode = function(text) {
//
// Encode/escape certain characters inside Markdown code runs.
// The point is that in code, these characters are literals,
// and lose their special Markdown meanings.
//
// Encode all ampersands; HTML entities are not
// entities within a Markdown code span.
text = text.replace(/&/g,"&");
// Do the angle bracket song and dance:
text = text.replace(/</g,"<");
text = text.replace(/>/g,">");
// Now, escape characters that are magic in Markdown:
text = escapeCharacters(text,"\*_{}[]\\",false);
// jj the line above breaks this:
//---
//* Item
// 1. Subitem
// special char: *
//---
return text;
}
var _DoItalicsAndBold = function(text) {
// <strong> must go first:
text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\1/g,
"<strong>$2</strong>");
text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,
"<em>$2</em>");
return text;
}
var _DoBlockQuotes = function(text) {
/*
text = text.replace(/
( // Wrap whole match in $1
(
^[ \t]*>[ \t]? // '>' at the start of a line
.+\n // rest of the first line
(.+\n)* // subsequent consecutive lines
\n* // blanks
)+
)
/gm, function(){...});
*/
text = text.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,
function(wholeMatch,m1) {
var bq = m1;
// attacklab: hack around Konqueror 3.5.4 bug:
// "----------bug".replace(/^-/g,"") == "bug"
bq = bq.replace(/^[ \t]*>[ \t]?/gm,"~0"); // trim one level of quoting
// attacklab: clean up hack
bq = bq.replace(/~0/g,"");
bq = bq.replace(/^[ \t]+$/gm,""); // trim whitespace-only lines
bq = _RunBlockGamut(bq); // recurse
bq = bq.replace(/(^|\n)/g,"$1 ");
// These leading spaces screw with <pre> content, so we need to fix that:
bq = bq.replace(
/(\s*<pre>[^\r]+?<\/pre>)/gm,
function(wholeMatch,m1) {
var pre = m1;
// attacklab: hack around Konqueror 3.5.4 bug:
pre = pre.replace(/^ /mg,"~0");
pre = pre.replace(/~0/g,"");
return pre;
});
return hashBlock("<blockquote>\n" + bq + "\n</blockquote>");
});
return text;
}
var _FormParagraphs = function(text) {
//
// Params:
// $text - string to process with html <p> tags
//
// Strip leading and trailing lines:
text = text.replace(/^\n+/g,"");
text = text.replace(/\n+$/g,"");
var grafs = text.split(/\n{2,}/g);
var grafsOut = new Array();
//
// Wrap <p> tags.
//
var end = grafs.length;
for (var i=0; i<end; i++) {
var str = grafs[i];
// if this is an HTML marker, copy it
if (str.search(/~K(\d+)K/g) >= 0) {
grafsOut.push(str);
}
else if (str.search(/\S/) >= 0) {
str = _RunSpanGamut(str);
str = str.replace(/^([ \t]*)/g,"<p>");
str += "</p>"
grafsOut.push(str);
}
}
//
// Unhashify HTML blocks
//
end = grafsOut.length;
for (var i=0; i<end; i++) {
// if this is a marker for an html block...
while (grafsOut[i].search(/~K(\d+)K/) >= 0) {
var blockText = g_html_blocks[RegExp.$1];
blockText = blockText.replace(/\$/g,"$$$$"); // Escape any dollar signs
grafsOut[i] = grafsOut[i].replace(/~K
gitextract_dpbewjre/ ├── .buildpath ├── .htaccess ├── .project ├── .settings/ │ └── org.eclipse.php.core.prefs ├── LICENSE.TXT ├── README.TXT ├── TODO.TXT ├── VERSION.TXT ├── config.default.php ├── controllers/ │ ├── answers.php │ ├── comments.php │ ├── helpers.php │ ├── questions.php │ ├── tags.php │ └── users.php ├── css/ │ ├── main.css │ ├── prettify.css │ ├── tagscomplete.css │ └── wmd.css ├── db/ │ ├── 1.txt │ ├── 2.txt │ └── 3.txt ├── index.php ├── install.php ├── js/ │ ├── fancyalert.js │ ├── jquery.js │ ├── prettify/ │ │ ├── lang-css.js │ │ ├── lang-hs.js │ │ ├── lang-lisp.js │ │ ├── lang-lua.js │ │ ├── lang-ml.js │ │ ├── lang-proto.js │ │ ├── lang-sql.js │ │ ├── lang-vb.js │ │ ├── lang-wiki.js │ │ └── prettify.js │ ├── showdown.js │ ├── tagscomplete.js │ └── wmd.js ├── libraries/ │ ├── helper.class.php │ ├── markdown.php │ ├── pagination.class.php │ ├── purifier/ │ │ ├── HTMLPurifier/ │ │ │ ├── AttrCollections.php │ │ │ ├── AttrDef/ │ │ │ │ ├── CSS/ │ │ │ │ │ ├── AlphaValue.php │ │ │ │ │ ├── Background.php │ │ │ │ │ ├── BackgroundPosition.php │ │ │ │ │ ├── Border.php │ │ │ │ │ ├── Color.php │ │ │ │ │ ├── Composite.php │ │ │ │ │ ├── DenyElementDecorator.php │ │ │ │ │ ├── Filter.php │ │ │ │ │ ├── Font.php │ │ │ │ │ ├── FontFamily.php │ │ │ │ │ ├── ImportantDecorator.php │ │ │ │ │ ├── Length.php │ │ │ │ │ ├── ListStyle.php │ │ │ │ │ ├── Multiple.php │ │ │ │ │ ├── Number.php │ │ │ │ │ ├── Percentage.php │ │ │ │ │ ├── TextDecoration.php │ │ │ │ │ └── URI.php │ │ │ │ ├── CSS.php │ │ │ │ ├── Enum.php │ │ │ │ ├── HTML/ │ │ │ │ │ ├── Bool.php │ │ │ │ │ ├── Class.php │ │ │ │ │ ├── Color.php │ │ │ │ │ ├── FrameTarget.php │ │ │ │ │ ├── ID.php │ │ │ │ │ ├── Length.php │ │ │ │ │ ├── LinkTypes.php │ │ │ │ │ ├── MultiLength.php │ │ │ │ │ ├── Nmtokens.php │ │ │ │ │ └── Pixels.php │ │ │ │ ├── Integer.php │ │ │ │ ├── Lang.php │ │ │ │ ├── Switch.php │ │ │ │ ├── Text.php │ │ │ │ ├── URI/ │ │ │ │ │ ├── Email/ │ │ │ │ │ │ └── SimpleCheck.php │ │ │ │ │ ├── Email.php │ │ │ │ │ ├── Host.php │ │ │ │ │ ├── IPv4.php │ │ │ │ │ └── IPv6.php │ │ │ │ └── URI.php │ │ │ ├── AttrDef.php │ │ │ ├── AttrTransform/ │ │ │ │ ├── Background.php │ │ │ │ ├── BdoDir.php │ │ │ │ ├── BgColor.php │ │ │ │ ├── BoolToCSS.php │ │ │ │ ├── Border.php │ │ │ │ ├── EnumToCSS.php │ │ │ │ ├── ImgRequired.php │ │ │ │ ├── ImgSpace.php │ │ │ │ ├── Input.php │ │ │ │ ├── Lang.php │ │ │ │ ├── Length.php │ │ │ │ ├── Name.php │ │ │ │ ├── NameSync.php │ │ │ │ ├── SafeEmbed.php │ │ │ │ ├── SafeObject.php │ │ │ │ ├── SafeParam.php │ │ │ │ ├── ScriptRequired.php │ │ │ │ └── Textarea.php │ │ │ ├── AttrTransform.php │ │ │ ├── AttrTypes.php │ │ │ ├── AttrValidator.php │ │ │ ├── Bootstrap.php │ │ │ ├── CSSDefinition.php │ │ │ ├── ChildDef/ │ │ │ │ ├── Chameleon.php │ │ │ │ ├── Custom.php │ │ │ │ ├── Empty.php │ │ │ │ ├── Optional.php │ │ │ │ ├── Required.php │ │ │ │ ├── StrictBlockquote.php │ │ │ │ └── Table.php │ │ │ ├── ChildDef.php │ │ │ ├── Config.php │ │ │ ├── ConfigSchema/ │ │ │ │ ├── Builder/ │ │ │ │ │ ├── ConfigSchema.php │ │ │ │ │ └── Xml.php │ │ │ │ ├── Exception.php │ │ │ │ ├── Interchange/ │ │ │ │ │ ├── Directive.php │ │ │ │ │ └── Id.php │ │ │ │ ├── Interchange.php │ │ │ │ ├── InterchangeBuilder.php │ │ │ │ ├── Validator.php │ │ │ │ ├── ValidatorAtom.php │ │ │ │ ├── schema/ │ │ │ │ │ ├── Attr.AllowedClasses.txt │ │ │ │ │ ├── Attr.AllowedFrameTargets.txt │ │ │ │ │ ├── Attr.AllowedRel.txt │ │ │ │ │ ├── Attr.AllowedRev.txt │ │ │ │ │ ├── Attr.ClassUseCDATA.txt │ │ │ │ │ ├── Attr.DefaultImageAlt.txt │ │ │ │ │ ├── Attr.DefaultInvalidImage.txt │ │ │ │ │ ├── Attr.DefaultInvalidImageAlt.txt │ │ │ │ │ ├── Attr.DefaultTextDir.txt │ │ │ │ │ ├── Attr.EnableID.txt │ │ │ │ │ ├── Attr.ForbiddenClasses.txt │ │ │ │ │ ├── Attr.IDBlacklist.txt │ │ │ │ │ ├── Attr.IDBlacklistRegexp.txt │ │ │ │ │ ├── Attr.IDPrefix.txt │ │ │ │ │ ├── Attr.IDPrefixLocal.txt │ │ │ │ │ ├── AutoFormat.AutoParagraph.txt │ │ │ │ │ ├── AutoFormat.Custom.txt │ │ │ │ │ ├── AutoFormat.DisplayLinkURI.txt │ │ │ │ │ ├── AutoFormat.Linkify.txt │ │ │ │ │ ├── AutoFormat.PurifierLinkify.DocURL.txt │ │ │ │ │ ├── AutoFormat.PurifierLinkify.txt │ │ │ │ │ ├── AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt │ │ │ │ │ ├── AutoFormat.RemoveEmpty.RemoveNbsp.txt │ │ │ │ │ ├── AutoFormat.RemoveEmpty.txt │ │ │ │ │ ├── CSS.AllowImportant.txt │ │ │ │ │ ├── CSS.AllowTricky.txt │ │ │ │ │ ├── CSS.AllowedProperties.txt │ │ │ │ │ ├── CSS.DefinitionRev.txt │ │ │ │ │ ├── CSS.MaxImgLength.txt │ │ │ │ │ ├── CSS.Proprietary.txt │ │ │ │ │ ├── Cache.DefinitionImpl.txt │ │ │ │ │ ├── Cache.SerializerPath.txt │ │ │ │ │ ├── Core.AggressivelyFixLt.txt │ │ │ │ │ ├── Core.CollectErrors.txt │ │ │ │ │ ├── Core.ColorKeywords.txt │ │ │ │ │ ├── Core.ConvertDocumentToFragment.txt │ │ │ │ │ ├── Core.DirectLexLineNumberSyncInterval.txt │ │ │ │ │ ├── Core.Encoding.txt │ │ │ │ │ ├── Core.EscapeInvalidChildren.txt │ │ │ │ │ ├── Core.EscapeInvalidTags.txt │ │ │ │ │ ├── Core.EscapeNonASCIICharacters.txt │ │ │ │ │ ├── Core.HiddenElements.txt │ │ │ │ │ ├── Core.Language.txt │ │ │ │ │ ├── Core.LexerImpl.txt │ │ │ │ │ ├── Core.MaintainLineNumbers.txt │ │ │ │ │ ├── Core.RemoveInvalidImg.txt │ │ │ │ │ ├── Core.RemoveScriptContents.txt │ │ │ │ │ ├── Filter.Custom.txt │ │ │ │ │ ├── Filter.ExtractStyleBlocks.Escaping.txt │ │ │ │ │ ├── Filter.ExtractStyleBlocks.Scope.txt │ │ │ │ │ ├── Filter.ExtractStyleBlocks.TidyImpl.txt │ │ │ │ │ ├── Filter.ExtractStyleBlocks.txt │ │ │ │ │ ├── Filter.YouTube.txt │ │ │ │ │ ├── HTML.Allowed.txt │ │ │ │ │ ├── HTML.AllowedAttributes.txt │ │ │ │ │ ├── HTML.AllowedElements.txt │ │ │ │ │ ├── HTML.AllowedModules.txt │ │ │ │ │ ├── HTML.Attr.Name.UseCDATA.txt │ │ │ │ │ ├── HTML.BlockWrapper.txt │ │ │ │ │ ├── HTML.CoreModules.txt │ │ │ │ │ ├── HTML.CustomDoctype.txt │ │ │ │ │ ├── HTML.DefinitionID.txt │ │ │ │ │ ├── HTML.DefinitionRev.txt │ │ │ │ │ ├── HTML.Doctype.txt │ │ │ │ │ ├── HTML.ForbiddenAttributes.txt │ │ │ │ │ ├── HTML.ForbiddenElements.txt │ │ │ │ │ ├── HTML.MaxImgLength.txt │ │ │ │ │ ├── HTML.Parent.txt │ │ │ │ │ ├── HTML.Proprietary.txt │ │ │ │ │ ├── HTML.SafeEmbed.txt │ │ │ │ │ ├── HTML.SafeObject.txt │ │ │ │ │ ├── HTML.Strict.txt │ │ │ │ │ ├── HTML.TidyAdd.txt │ │ │ │ │ ├── HTML.TidyLevel.txt │ │ │ │ │ ├── HTML.TidyRemove.txt │ │ │ │ │ ├── HTML.Trusted.txt │ │ │ │ │ ├── HTML.XHTML.txt │ │ │ │ │ ├── Output.CommentScriptContents.txt │ │ │ │ │ ├── Output.Newline.txt │ │ │ │ │ ├── Output.SortAttr.txt │ │ │ │ │ ├── Output.TidyFormat.txt │ │ │ │ │ ├── Test.ForceNoIconv.txt │ │ │ │ │ ├── URI.AllowedSchemes.txt │ │ │ │ │ ├── URI.Base.txt │ │ │ │ │ ├── URI.DefaultScheme.txt │ │ │ │ │ ├── URI.DefinitionID.txt │ │ │ │ │ ├── URI.DefinitionRev.txt │ │ │ │ │ ├── URI.Disable.txt │ │ │ │ │ ├── URI.DisableExternal.txt │ │ │ │ │ ├── URI.DisableExternalResources.txt │ │ │ │ │ ├── URI.DisableResources.txt │ │ │ │ │ ├── URI.Host.txt │ │ │ │ │ ├── URI.HostBlacklist.txt │ │ │ │ │ ├── URI.MakeAbsolute.txt │ │ │ │ │ ├── URI.Munge.txt │ │ │ │ │ ├── URI.MungeResources.txt │ │ │ │ │ ├── URI.MungeSecretKey.txt │ │ │ │ │ ├── URI.OverrideAllowedSchemes.txt │ │ │ │ │ └── info.ini │ │ │ │ └── schema.ser │ │ │ ├── ConfigSchema.php │ │ │ ├── ContentSets.php │ │ │ ├── Context.php │ │ │ ├── Definition.php │ │ │ ├── DefinitionCache/ │ │ │ │ ├── Decorator/ │ │ │ │ │ ├── Cleanup.php │ │ │ │ │ ├── Memory.php │ │ │ │ │ └── Template.php.in │ │ │ │ ├── Decorator.php │ │ │ │ ├── Null.php │ │ │ │ ├── Serializer/ │ │ │ │ │ ├── HTML/ │ │ │ │ │ │ └── 4.0.0,ddc9b993d7fc8d4a185e8dbf5b9a0996,1.ser │ │ │ │ │ ├── README │ │ │ │ │ └── URI/ │ │ │ │ │ └── 4.0.0,05c766101e813c246917b022f97b5e6e,1.ser │ │ │ │ └── Serializer.php │ │ │ ├── DefinitionCache.php │ │ │ ├── DefinitionCacheFactory.php │ │ │ ├── Doctype.php │ │ │ ├── DoctypeRegistry.php │ │ │ ├── ElementDef.php │ │ │ ├── Encoder.php │ │ │ ├── EntityLookup/ │ │ │ │ └── entities.ser │ │ │ ├── EntityLookup.php │ │ │ ├── EntityParser.php │ │ │ ├── ErrorCollector.php │ │ │ ├── ErrorStruct.php │ │ │ ├── Exception.php │ │ │ ├── Filter/ │ │ │ │ ├── ExtractStyleBlocks.php │ │ │ │ └── YouTube.php │ │ │ ├── Filter.php │ │ │ ├── Generator.php │ │ │ ├── HTMLDefinition.php │ │ │ ├── HTMLModule/ │ │ │ │ ├── Bdo.php │ │ │ │ ├── CommonAttributes.php │ │ │ │ ├── Edit.php │ │ │ │ ├── Forms.php │ │ │ │ ├── Hypertext.php │ │ │ │ ├── Image.php │ │ │ │ ├── Legacy.php │ │ │ │ ├── List.php │ │ │ │ ├── Name.php │ │ │ │ ├── NonXMLCommonAttributes.php │ │ │ │ ├── Object.php │ │ │ │ ├── Presentation.php │ │ │ │ ├── Proprietary.php │ │ │ │ ├── Ruby.php │ │ │ │ ├── SafeEmbed.php │ │ │ │ ├── SafeObject.php │ │ │ │ ├── Scripting.php │ │ │ │ ├── StyleAttribute.php │ │ │ │ ├── Tables.php │ │ │ │ ├── Target.php │ │ │ │ ├── Text.php │ │ │ │ ├── Tidy/ │ │ │ │ │ ├── Name.php │ │ │ │ │ ├── Proprietary.php │ │ │ │ │ ├── Strict.php │ │ │ │ │ ├── Transitional.php │ │ │ │ │ ├── XHTML.php │ │ │ │ │ └── XHTMLAndHTML4.php │ │ │ │ ├── Tidy.php │ │ │ │ └── XMLCommonAttributes.php │ │ │ ├── HTMLModule.php │ │ │ ├── HTMLModuleManager.php │ │ │ ├── IDAccumulator.php │ │ │ ├── Injector/ │ │ │ │ ├── AutoParagraph.php │ │ │ │ ├── DisplayLinkURI.php │ │ │ │ ├── Linkify.php │ │ │ │ ├── PurifierLinkify.php │ │ │ │ ├── RemoveEmpty.php │ │ │ │ └── SafeObject.php │ │ │ ├── Injector.php │ │ │ ├── Language/ │ │ │ │ ├── classes/ │ │ │ │ │ └── en-x-test.php │ │ │ │ └── messages/ │ │ │ │ ├── en-x-test.php │ │ │ │ ├── en-x-testmini.php │ │ │ │ └── en.php │ │ │ ├── Language.php │ │ │ ├── LanguageFactory.php │ │ │ ├── Length.php │ │ │ ├── Lexer/ │ │ │ │ ├── DOMLex.php │ │ │ │ ├── DirectLex.php │ │ │ │ ├── PEARSax3.php │ │ │ │ └── PH5P.php │ │ │ ├── Lexer.php │ │ │ ├── PercentEncoder.php │ │ │ ├── Printer/ │ │ │ │ ├── CSSDefinition.php │ │ │ │ ├── ConfigForm.css │ │ │ │ ├── ConfigForm.js │ │ │ │ ├── ConfigForm.php │ │ │ │ └── HTMLDefinition.php │ │ │ ├── Printer.php │ │ │ ├── PropertyList.php │ │ │ ├── PropertyListIterator.php │ │ │ ├── Strategy/ │ │ │ │ ├── Composite.php │ │ │ │ ├── Core.php │ │ │ │ ├── FixNesting.php │ │ │ │ ├── MakeWellFormed.php │ │ │ │ ├── RemoveForeignElements.php │ │ │ │ └── ValidateAttributes.php │ │ │ ├── Strategy.php │ │ │ ├── StringHash.php │ │ │ ├── StringHashParser.php │ │ │ ├── TagTransform/ │ │ │ │ ├── Font.php │ │ │ │ └── Simple.php │ │ │ ├── TagTransform.php │ │ │ ├── Token/ │ │ │ │ ├── Comment.php │ │ │ │ ├── Empty.php │ │ │ │ ├── End.php │ │ │ │ ├── Start.php │ │ │ │ ├── Tag.php │ │ │ │ └── Text.php │ │ │ ├── Token.php │ │ │ ├── TokenFactory.php │ │ │ ├── URI.php │ │ │ ├── URIDefinition.php │ │ │ ├── URIFilter/ │ │ │ │ ├── DisableExternal.php │ │ │ │ ├── DisableExternalResources.php │ │ │ │ ├── HostBlacklist.php │ │ │ │ ├── MakeAbsolute.php │ │ │ │ └── Munge.php │ │ │ ├── URIFilter.php │ │ │ ├── URIParser.php │ │ │ ├── URIScheme/ │ │ │ │ ├── ftp.php │ │ │ │ ├── http.php │ │ │ │ ├── https.php │ │ │ │ ├── mailto.php │ │ │ │ ├── news.php │ │ │ │ └── nntp.php │ │ │ ├── URIScheme.php │ │ │ ├── URISchemeRegistry.php │ │ │ ├── UnitConverter.php │ │ │ ├── VarParser/ │ │ │ │ ├── Flexible.php │ │ │ │ └── Native.php │ │ │ ├── VarParser.php │ │ │ └── VarParserException.php │ │ ├── HTMLPurifier.auto.php │ │ ├── HTMLPurifier.autoload.php │ │ ├── HTMLPurifier.func.php │ │ ├── HTMLPurifier.includes.php │ │ ├── HTMLPurifier.kses.php │ │ ├── HTMLPurifier.path.php │ │ ├── HTMLPurifier.php │ │ └── HTMLPurifier.safe-includes.php │ ├── score.php │ ├── shared.php │ ├── template.class.php │ └── timeago.php ├── views/ │ ├── answers/ │ │ └── edit.php │ ├── comments/ │ │ └── post.php │ ├── footer.php │ ├── header.php │ ├── helpers/ │ │ └── getuser.php │ ├── questions/ │ │ ├── ask.php │ │ ├── cache.php │ │ ├── edit.php │ │ ├── index.php │ │ └── view.php │ ├── tags/ │ │ └── index.php │ └── users/ │ ├── edit.php │ ├── index.php │ ├── login.php │ ├── logout.php │ ├── register.php │ └── view.php └── web.config
SYMBOL INDEX (1037 symbols across 228 files)
FILE: controllers/answers.php
function edit (line 3) | function edit() {
function post (line 31) | function post() {
function update (line 56) | function update() {
function vote (line 86) | function vote() {
function accept (line 163) | function accept() {
FILE: controllers/comments.php
function post (line 3) | function post() {
function vote (line 45) | function vote() {
function del (line 88) | function del() {
FILE: controllers/helpers.php
function getUser (line 3) | function getUser($id) {
FILE: controllers/questions.php
function ask (line 3) | function ask() {
function edit (line 41) | function edit() {
function post (line 103) | function post() {
function update (line 170) | function update() {
function fetchtags (line 251) | function fetchtags() {
function view (line 269) | function view() {
function cache (line 693) | function cache() {
function vote (line 709) | function vote() {
function fave (line 786) | function fave() {
function index (line 815) | function index() {
FILE: controllers/tags.php
function index (line 3) | function index() {
FILE: controllers/users.php
function login (line 3) | function login() {
function view (line 8) | function view() {
function edit (line 24) | function edit() {
function update (line 34) | function update() {
function validate (line 57) | function validate() {
function register (line 87) | function register() {
function create (line 91) | function create() {
function logout (line 104) | function logout() {
function index (line 111) | function index() {
FILE: install.php
function db (line 5) | function db() {
FILE: js/jquery.js
function K (line 12) | function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.g...
function z (line 12) | function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script...
function e (line 12) | function e(){return +new Date}
function I (line 12) | function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){...
function j (line 12) | function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}
function P (line 19) | function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,...
function S (line 19) | function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,...
function k (line 19) | function k(){return false}
function u (line 19) | function u(){return true}
function c (line 19) | function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.eac...
function i (line 19) | function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")]....
function B (line 19) | function B(){if(x){return}x=true;if(document.addEventListener){document....
function I (line 19) | function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("...
function L (line 19) | function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger...
function H (line 19) | function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent...
function t (line 19) | function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function...
function F (line 19) | function F(J){return E.step(J)}
FILE: js/prettify/prettify.js
function Ld (line 11) | function Ld(a){return a.replace(Ja,pb).replace(Ka,qb).replace(La,rb).rep...
function ga (line 11) | function ga(a){return a.replace(Ja,pb).replace(Ka,qb).replace(La,rb)}
function Sd (line 12) | function Sd(a){var b=a.indexOf(G);if(b<0)return a;for(--b;(b=a.indexOf(t...
function Ma (line 12) | function Ma(a){return yb===a.tagName}
function W (line 12) | function W(a,b){switch(a.nodeType){case 1:var c=
function Na (line 13) | function Na(a){for(var b=0,c=z,d=z,g=0,i=a.length;g<i;++g){var m=a[g];if...
function Td (line 18) | function Td(a){if(r===ha){var b=document.createElement(gc);b.appendChild...
function Ud (line 18) | function Ud(a){var b=0;return function(c){for(var d=r,g=0,i=0,m=c.length...
function Zd (line 19) | function Zd(a){var b=a.match(Vd),c=[],d=0,g=[];if(b)for(var i=0,m=b.leng...
function $d (line 20) | function $d(a){return!!a.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*...
function ia (line 20) | function ia(a,b,c,d){if(b){var g={source:b,b:a};c(g);d.push.apply(d,g.c)}}
function K (line 20) | function K(a,b){var c={},d;(function(){for(var m=a.concat(b),
function C (line 22) | function C(a){var b=[],c=[];if(a.tripleQuotedStrings)b.push([U,/^(?:\'\'...
function be (line 24) | function be(a){var b=a.source,c=a.f,d=a.c,
function y (line 26) | function y(a,b){for(var c=b.length;--c>=0;){var d=b[c];if(X.hasOwnProper...
function Ra (line 26) | function Ra(a,b){a&&X.hasOwnProperty(a)||(a=/^\s*</.test(b)?Kc:Lc);retur...
function Sa (line 29) | function Sa(a){var b=a.e,c=a.d;a.a=b;try{var d=Zd(b),g=d.source;a.source...
function ce (line 29) | function ce(a,b){var c={e:a,d:b};Sa(c);return c.a}
function de (line 29) | function de(a){for(var b=window._pr_isIE6(),c=[document.getElementsByTag...
FILE: js/showdown.js
function char2hex (line 1170) | function char2hex(ch) {
FILE: js/tagscomplete.js
function init (line 59) | function init()
function createFCBK (line 66) | function createFCBK()
function preSet (line 98) | function preSet()
function addItem (line 129) | function addItem (title, value, preadded)
function removeItem (line 185) | function removeItem(item)
function addInput (line 198) | function addInput(focusme)
function addMembers (line 333) | function addMembers(etext, data)
function itemIllumination (line 417) | function itemIllumination(text, etext)
function bindFeedEvent (line 434) | function bindFeedEvent()
function removeFeedEvent (line 454) | function removeFeedEvent()
function bindEvents (line 467) | function bindEvents()
function addTextItem (line 569) | function addTextItem(value)
function funCall (line 588) | function funCall(func,item)
function checkFocusOn (line 604) | function checkFocusOn()
function xssPrevent (line 617) | function xssPrevent(string)
FILE: libraries/helper.class.php
class Helper (line 2) | class Helper {
method set (line 11) | function set($name,$value) {
method render (line 17) | function render() {
function getContent (line 47) | function getContent($filename) {
FILE: libraries/markdown.php
function Markdown (line 43) | function Markdown($text) {
function mdwp_add_p (line 118) | function mdwp_add_p($text) {
function mdwp_strip_p (line 126) | function mdwp_strip_p($t) { return preg_replace('{</?p>}i', '', $t); }
function mdwp_hide_tags (line 128) | function mdwp_hide_tags($text) {
function mdwp_show_tags (line 132) | function mdwp_show_tags($text) {
function identify_modifier_markdown (line 141) | function identify_modifier_markdown() {
function smarty_modifier_markdown (line 157) | function smarty_modifier_markdown($text) {
class Textile (line 170) | class Textile {
method TextileThis (line 171) | function TextileThis($text, $lite='', $encode='') {
method TextileRestricted (line 177) | function TextileRestricted($text, $lite='', $noimage='') {
method blockLite (line 181) | function blockLite($text) { return $text; }
class Markdown_Parser (line 191) | class Markdown_Parser {
method Markdown_Parser (line 218) | function Markdown_Parser() {
method setup (line 251) | function setup() {
method teardown (line 264) | function teardown() {
method transform (line 275) | function transform($text) {
method stripLinkDefinitions (line 322) | function stripLinkDefinitions($text) {
method _stripLinkDefinitions_callback (line 352) | function _stripLinkDefinitions_callback($matches) {
method hashHTMLBlocks (line 360) | function hashHTMLBlocks($text) {
method _hashHTMLBlocks_callback (line 497) | function _hashHTMLBlocks_callback($matches) {
method hashPart (line 504) | function hashPart($text, $boundary = 'X') {
method hashBlock (line 527) | function hashBlock($text) {
method runBlockGamut (line 548) | function runBlockGamut($text) {
method runBasicBlockGamut (line 562) | function runBasicBlockGamut($text) {
method doHorizontalRules (line 579) | function doHorizontalRules($text) {
method runSpanGamut (line 621) | function runSpanGamut($text) {
method doHardBreaks (line 633) | function doHardBreaks($text) {
method _doHardBreaks_callback (line 638) | function _doHardBreaks_callback($matches) {
method doAnchors (line 643) | function doAnchors($text) {
method _doAnchors_reference_callback (line 713) | function _doAnchors_reference_callback($matches) {
method _doAnchors_inline_callback (line 747) | function _doAnchors_inline_callback($matches) {
method doImages (line 768) | function doImages($text) {
method _doImages_reference_callback (line 823) | function _doImages_reference_callback($matches) {
method _doImages_inline_callback (line 851) | function _doImages_inline_callback($matches) {
method doHeaders (line 870) | function doHeaders($text) {
method _doHeaders_callback_setext (line 900) | function _doHeaders_callback_setext($matches) {
function outdent (line 1557) | function outdent($text) {
function detab (line 1569) | function detab($text) {
function _detab_callback (line 1582) | function _detab_callback($matches) {
function _initDetab (line 1599) | function _initDetab() {
function unhash (line 1613) | function unhash($text) {
function _unhash_callback (line 1620) | function _unhash_callback($matches) {
FILE: libraries/pagination.class.php
class Pagination (line 5) | class Pagination{
method set (line 23) | function set($who,$what){
method checkValues (line 28) | function checkValues(){
method display (line 35) | function display($return = true){
method generateOutput (line 41) | function generateOutput(){
method generate_link (line 73) | function generate_link($page,$label=''){
method displayOptions (line 80) | function displayOptions(){
method generate_seclink (line 92) | function generate_seclink($label){
FILE: libraries/purifier/HTMLPurifier.autoload.php
function __autoload (line 16) | function __autoload($class) {
FILE: libraries/purifier/HTMLPurifier.func.php
function HTMLPurifier (line 15) | function HTMLPurifier($html, $config = null) {
FILE: libraries/purifier/HTMLPurifier.kses.php
function kses (line 10) | function kses($string, $allowed_html, $allowed_protocols = null) {
FILE: libraries/purifier/HTMLPurifier.php
class HTMLPurifier (line 54) | class HTMLPurifier
method __construct (line 88) | public function __construct($config = null) {
method addFilter (line 100) | public function addFilter($filter) {
method purify (line 115) | public function purify($html, $config = null) {
method purifyArray (line 199) | public function purifyArray($array_of_html, $config = null) {
method instance (line 215) | public static function instance($prototype = null) {
method getInstance (line 231) | public static function getInstance($prototype = null) {
FILE: libraries/purifier/HTMLPurifier/AttrCollections.php
class HTMLPurifier_AttrCollections (line 7) | class HTMLPurifier_AttrCollections
method __construct (line 22) | public function __construct($attr_types, $modules) {
method performInclusions (line 54) | public function performInclusions(&$attr) {
method expandIdentifiers (line 82) | public function expandIdentifiers(&$attr, $attr_types) {
FILE: libraries/purifier/HTMLPurifier/AttrDef.php
class HTMLPurifier_AttrDef (line 13) | abstract class HTMLPurifier_AttrDef
method validate (line 35) | abstract public function validate($string, $config, $context);
method parseCDATA (line 58) | public function parseCDATA($string) {
method make (line 69) | public function make($string) {
method mungeRgb (line 81) | protected function mungeRgb($string) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS.php
class HTMLPurifier_AttrDef_CSS (line 14) | class HTMLPurifier_AttrDef_CSS extends HTMLPurifier_AttrDef
method validate (line 17) | public function validate($css, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/AlphaValue.php
class HTMLPurifier_AttrDef_CSS_AlphaValue (line 3) | class HTMLPurifier_AttrDef_CSS_AlphaValue extends HTMLPurifier_AttrDef_C...
method __construct (line 6) | public function __construct() {
method validate (line 10) | public function validate($number, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/Background.php
class HTMLPurifier_AttrDef_CSS_Background (line 7) | class HTMLPurifier_AttrDef_CSS_Background extends HTMLPurifier_AttrDef
method __construct (line 16) | public function __construct($config) {
method validate (line 25) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php
class HTMLPurifier_AttrDef_CSS_BackgroundPosition (line 44) | class HTMLPurifier_AttrDef_CSS_BackgroundPosition extends HTMLPurifier_A...
method __construct (line 50) | public function __construct() {
method validate (line 55) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/Border.php
class HTMLPurifier_AttrDef_CSS_Border (line 6) | class HTMLPurifier_AttrDef_CSS_Border extends HTMLPurifier_AttrDef
method __construct (line 14) | public function __construct($config) {
method validate (line 21) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/Color.php
class HTMLPurifier_AttrDef_CSS_Color (line 6) | class HTMLPurifier_AttrDef_CSS_Color extends HTMLPurifier_AttrDef
method validate (line 9) | public function validate($color, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/Composite.php
class HTMLPurifier_AttrDef_CSS_Composite (line 12) | class HTMLPurifier_AttrDef_CSS_Composite extends HTMLPurifier_AttrDef
method __construct (line 24) | public function __construct($defs) {
method validate (line 28) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php
class HTMLPurifier_AttrDef_CSS_DenyElementDecorator (line 6) | class HTMLPurifier_AttrDef_CSS_DenyElementDecorator extends HTMLPurifier...
method __construct (line 14) | public function __construct($def, $element) {
method validate (line 21) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/Filter.php
class HTMLPurifier_AttrDef_CSS_Filter (line 8) | class HTMLPurifier_AttrDef_CSS_Filter extends HTMLPurifier_AttrDef
method __construct (line 13) | public function __construct() {
method validate (line 17) | public function validate($value, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/Font.php
class HTMLPurifier_AttrDef_CSS_Font (line 6) | class HTMLPurifier_AttrDef_CSS_Font extends HTMLPurifier_AttrDef
method __construct (line 19) | public function __construct($config) {
method validate (line 29) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/FontFamily.php
class HTMLPurifier_AttrDef_CSS_FontFamily (line 7) | class HTMLPurifier_AttrDef_CSS_FontFamily extends HTMLPurifier_AttrDef
method validate (line 10) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php
class HTMLPurifier_AttrDef_CSS_ImportantDecorator (line 6) | class HTMLPurifier_AttrDef_CSS_ImportantDecorator extends HTMLPurifier_A...
method __construct (line 14) | public function __construct($def, $allow = false) {
method validate (line 21) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/Length.php
class HTMLPurifier_AttrDef_CSS_Length (line 6) | class HTMLPurifier_AttrDef_CSS_Length extends HTMLPurifier_AttrDef
method __construct (line 15) | public function __construct($min = null, $max = null) {
method validate (line 20) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/ListStyle.php
class HTMLPurifier_AttrDef_CSS_ListStyle (line 7) | class HTMLPurifier_AttrDef_CSS_ListStyle extends HTMLPurifier_AttrDef
method __construct (line 16) | public function __construct($config) {
method validate (line 23) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/Multiple.php
class HTMLPurifier_AttrDef_CSS_Multiple (line 14) | class HTMLPurifier_AttrDef_CSS_Multiple extends HTMLPurifier_AttrDef
method __construct (line 33) | public function __construct($single, $max = 4) {
method validate (line 38) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/Number.php
class HTMLPurifier_AttrDef_CSS_Number (line 6) | class HTMLPurifier_AttrDef_CSS_Number extends HTMLPurifier_AttrDef
method __construct (line 17) | public function __construct($non_negative = false) {
method validate (line 25) | public function validate($number, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/Percentage.php
class HTMLPurifier_AttrDef_CSS_Percentage (line 6) | class HTMLPurifier_AttrDef_CSS_Percentage extends HTMLPurifier_AttrDef
method __construct (line 17) | public function __construct($non_negative = false) {
method validate (line 21) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/TextDecoration.php
class HTMLPurifier_AttrDef_CSS_TextDecoration (line 8) | class HTMLPurifier_AttrDef_CSS_TextDecoration extends HTMLPurifier_AttrDef
method validate (line 11) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/CSS/URI.php
class HTMLPurifier_AttrDef_CSS_URI (line 12) | class HTMLPurifier_AttrDef_CSS_URI extends HTMLPurifier_AttrDef_URI
method __construct (line 15) | public function __construct() {
method validate (line 19) | public function validate($uri_string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/Enum.php
class HTMLPurifier_AttrDef_Enum (line 10) | class HTMLPurifier_AttrDef_Enum extends HTMLPurifier_AttrDef
method __construct (line 29) | public function __construct(
method validate (line 36) | public function validate($string, $config, $context) {
method make (line 52) | public function make($string) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/HTML/Bool.php
class HTMLPurifier_AttrDef_HTML_Bool (line 6) | class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef
method __construct (line 12) | public function __construct($name = false) {$this->name = $name;}
method validate (line 14) | public function validate($string, $config, $context) {
method make (line 22) | public function make($string) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/HTML/Class.php
class HTMLPurifier_AttrDef_HTML_Class (line 6) | class HTMLPurifier_AttrDef_HTML_Class extends HTMLPurifier_AttrDef_HTML_...
method split (line 8) | protected function split($string, $config, $context) {
method filter (line 17) | protected function filter($tokens, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/HTML/Color.php
class HTMLPurifier_AttrDef_HTML_Color (line 6) | class HTMLPurifier_AttrDef_HTML_Color extends HTMLPurifier_AttrDef
method validate (line 9) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/HTML/FrameTarget.php
class HTMLPurifier_AttrDef_HTML_FrameTarget (line 6) | class HTMLPurifier_AttrDef_HTML_FrameTarget extends HTMLPurifier_AttrDef...
method __construct (line 12) | public function __construct() {}
method validate (line 14) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/HTML/ID.php
class HTMLPurifier_AttrDef_HTML_ID (line 12) | class HTMLPurifier_AttrDef_HTML_ID extends HTMLPurifier_AttrDef
method validate (line 18) | public function validate($id, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/HTML/Length.php
class HTMLPurifier_AttrDef_HTML_Length (line 10) | class HTMLPurifier_AttrDef_HTML_Length extends HTMLPurifier_AttrDef_HTML...
method validate (line 13) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/HTML/LinkTypes.php
class HTMLPurifier_AttrDef_HTML_LinkTypes (line 9) | class HTMLPurifier_AttrDef_HTML_LinkTypes extends HTMLPurifier_AttrDef
method __construct (line 15) | public function __construct($name) {
method validate (line 28) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/HTML/MultiLength.php
class HTMLPurifier_AttrDef_HTML_MultiLength (line 9) | class HTMLPurifier_AttrDef_HTML_MultiLength extends HTMLPurifier_AttrDef...
method validate (line 12) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/HTML/Nmtokens.php
class HTMLPurifier_AttrDef_HTML_Nmtokens (line 6) | class HTMLPurifier_AttrDef_HTML_Nmtokens extends HTMLPurifier_AttrDef
method validate (line 9) | public function validate($string, $config, $context) {
method split (line 26) | protected function split($string, $config, $context) {
method filter (line 46) | protected function filter($tokens, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/HTML/Pixels.php
class HTMLPurifier_AttrDef_HTML_Pixels (line 6) | class HTMLPurifier_AttrDef_HTML_Pixels extends HTMLPurifier_AttrDef
method __construct (line 11) | public function __construct($max = null) {
method validate (line 15) | public function validate($string, $config, $context) {
method make (line 39) | public function make($string) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/Integer.php
class HTMLPurifier_AttrDef_Integer (line 10) | class HTMLPurifier_AttrDef_Integer extends HTMLPurifier_AttrDef
method __construct (line 33) | public function __construct(
method validate (line 41) | public function validate($integer, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/Lang.php
class HTMLPurifier_AttrDef_Lang (line 7) | class HTMLPurifier_AttrDef_Lang extends HTMLPurifier_AttrDef
method validate (line 10) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/Switch.php
class HTMLPurifier_AttrDef_Switch (line 6) | class HTMLPurifier_AttrDef_Switch
method __construct (line 17) | public function __construct($tag, $with_tag, $without_tag) {
method validate (line 23) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/Text.php
class HTMLPurifier_AttrDef_Text (line 6) | class HTMLPurifier_AttrDef_Text extends HTMLPurifier_AttrDef
method validate (line 9) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/URI.php
class HTMLPurifier_AttrDef_URI (line 7) | class HTMLPurifier_AttrDef_URI extends HTMLPurifier_AttrDef
method __construct (line 16) | public function __construct($embeds_resource = false) {
method make (line 21) | public function make($string) {
method validate (line 26) | public function validate($uri, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/URI/Email.php
class HTMLPurifier_AttrDef_URI_Email (line 3) | abstract class HTMLPurifier_AttrDef_URI_Email extends HTMLPurifier_AttrDef
method unpack (line 9) | function unpack($string) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php
class HTMLPurifier_AttrDef_URI_Email_SimpleCheck (line 7) | class HTMLPurifier_AttrDef_URI_Email_SimpleCheck extends HTMLPurifier_At...
method validate (line 10) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/URI/Host.php
class HTMLPurifier_AttrDef_URI_Host (line 6) | class HTMLPurifier_AttrDef_URI_Host extends HTMLPurifier_AttrDef
method __construct (line 19) | public function __construct() {
method validate (line 24) | public function validate($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrDef/URI/IPv4.php
class HTMLPurifier_AttrDef_URI_IPv4 (line 7) | class HTMLPurifier_AttrDef_URI_IPv4 extends HTMLPurifier_AttrDef
method validate (line 15) | public function validate($aIP, $config, $context) {
method _loadRegex (line 32) | protected function _loadRegex() {
FILE: libraries/purifier/HTMLPurifier/AttrDef/URI/IPv6.php
class HTMLPurifier_AttrDef_URI_IPv6 (line 9) | class HTMLPurifier_AttrDef_URI_IPv6 extends HTMLPurifier_AttrDef_URI_IPv4
method validate (line 12) | public function validate($aIP, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform.php
class HTMLPurifier_AttrTransform (line 17) | abstract class HTMLPurifier_AttrTransform
method transform (line 29) | abstract public function transform($attr, $config, $context);
method prependCSS (line 37) | public function prependCSS(&$attr, $css) {
method confiscateAttr (line 47) | public function confiscateAttr(&$attr, $key) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/Background.php
class HTMLPurifier_AttrTransform_Background (line 6) | class HTMLPurifier_AttrTransform_Background extends HTMLPurifier_AttrTra...
method transform (line 8) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/BdoDir.php
class HTMLPurifier_AttrTransform_BdoDir (line 8) | class HTMLPurifier_AttrTransform_BdoDir extends HTMLPurifier_AttrTransform
method transform (line 11) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/BgColor.php
class HTMLPurifier_AttrTransform_BgColor (line 6) | class HTMLPurifier_AttrTransform_BgColor extends HTMLPurifier_AttrTransf...
method transform (line 8) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/BoolToCSS.php
class HTMLPurifier_AttrTransform_BoolToCSS (line 6) | class HTMLPurifier_AttrTransform_BoolToCSS extends HTMLPurifier_AttrTran...
method __construct (line 22) | public function __construct($attr, $css) {
method transform (line 27) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/Border.php
class HTMLPurifier_AttrTransform_Border (line 6) | class HTMLPurifier_AttrTransform_Border extends HTMLPurifier_AttrTransfo...
method transform (line 8) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/EnumToCSS.php
class HTMLPurifier_AttrTransform_EnumToCSS (line 7) | class HTMLPurifier_AttrTransform_EnumToCSS extends HTMLPurifier_AttrTran...
method __construct (line 31) | public function __construct($attr, $enum_to_css, $case_sensitive = fal...
method transform (line 37) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/ImgRequired.php
class HTMLPurifier_AttrTransform_ImgRequired (line 11) | class HTMLPurifier_AttrTransform_ImgRequired extends HTMLPurifier_AttrTr...
method transform (line 14) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/ImgSpace.php
class HTMLPurifier_AttrTransform_ImgSpace (line 6) | class HTMLPurifier_AttrTransform_ImgSpace extends HTMLPurifier_AttrTrans...
method __construct (line 14) | public function __construct($attr) {
method transform (line 21) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/Input.php
class HTMLPurifier_AttrTransform_Input (line 7) | class HTMLPurifier_AttrTransform_Input extends HTMLPurifier_AttrTransform {
method __construct (line 11) | public function __construct() {
method transform (line 15) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/Lang.php
class HTMLPurifier_AttrTransform_Lang (line 8) | class HTMLPurifier_AttrTransform_Lang extends HTMLPurifier_AttrTransform
method transform (line 11) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/Length.php
class HTMLPurifier_AttrTransform_Length (line 6) | class HTMLPurifier_AttrTransform_Length extends HTMLPurifier_AttrTransform
method __construct (line 12) | public function __construct($name, $css_name = null) {
method transform (line 17) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/Name.php
class HTMLPurifier_AttrTransform_Name (line 6) | class HTMLPurifier_AttrTransform_Name extends HTMLPurifier_AttrTransform
method transform (line 9) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/NameSync.php
class HTMLPurifier_AttrTransform_NameSync (line 8) | class HTMLPurifier_AttrTransform_NameSync extends HTMLPurifier_AttrTrans...
method __construct (line 11) | public function __construct() {
method transform (line 15) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/SafeEmbed.php
class HTMLPurifier_AttrTransform_SafeEmbed (line 3) | class HTMLPurifier_AttrTransform_SafeEmbed extends HTMLPurifier_AttrTran...
method transform (line 7) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/SafeObject.php
class HTMLPurifier_AttrTransform_SafeObject (line 6) | class HTMLPurifier_AttrTransform_SafeObject extends HTMLPurifier_AttrTra...
method transform (line 10) | function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/SafeParam.php
class HTMLPurifier_AttrTransform_SafeParam (line 15) | class HTMLPurifier_AttrTransform_SafeParam extends HTMLPurifier_AttrTran...
method __construct (line 20) | public function __construct() {
method transform (line 24) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/ScriptRequired.php
class HTMLPurifier_AttrTransform_ScriptRequired (line 6) | class HTMLPurifier_AttrTransform_ScriptRequired extends HTMLPurifier_Att...
method transform (line 8) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTransform/Textarea.php
class HTMLPurifier_AttrTransform_Textarea (line 6) | class HTMLPurifier_AttrTransform_Textarea extends HTMLPurifier_AttrTrans...
method transform (line 9) | public function transform($attr, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/AttrTypes.php
class HTMLPurifier_AttrTypes (line 6) | class HTMLPurifier_AttrTypes
method __construct (line 17) | public function __construct() {
method get (line 52) | public function get($type) {
method set (line 72) | public function set($type, $impl) {
FILE: libraries/purifier/HTMLPurifier/AttrValidator.php
class HTMLPurifier_AttrValidator (line 8) | class HTMLPurifier_AttrValidator
method validateToken (line 21) | public function validateToken(&$token, &$config, $context) {
FILE: libraries/purifier/HTMLPurifier/Bootstrap.php
class HTMLPurifier_Bootstrap (line 30) | class HTMLPurifier_Bootstrap
method autoload (line 37) | public static function autoload($class) {
method getPath (line 47) | public static function getPath($class) {
method registerAutoload (line 63) | public static function registerAutoload() {
FILE: libraries/purifier/HTMLPurifier/CSSDefinition.php
class HTMLPurifier_CSSDefinition (line 7) | class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition
method doSetup (line 20) | protected function doSetup($config) {
method doSetupProprietary (line 231) | protected function doSetupProprietary($config) {
method doSetupTricky (line 250) | protected function doSetupTricky($config) {
method setupConfigStuff (line 270) | protected function setupConfigStuff($config) {
FILE: libraries/purifier/HTMLPurifier/ChildDef.php
class HTMLPurifier_ChildDef (line 6) | abstract class HTMLPurifier_ChildDef
method getAllowedElements (line 31) | public function getAllowedElements($config) {
method validateChildren (line 45) | abstract public function validateChildren($tokens_of_children, $config...
FILE: libraries/purifier/HTMLPurifier/ChildDef/Chameleon.php
class HTMLPurifier_ChildDef_Chameleon (line 12) | class HTMLPurifier_ChildDef_Chameleon extends HTMLPurifier_ChildDef
method __construct (line 31) | public function __construct($inline, $block) {
method validateChildren (line 37) | public function validateChildren($tokens_of_children, $config, $contex...
FILE: libraries/purifier/HTMLPurifier/ChildDef/Custom.php
class HTMLPurifier_ChildDef_Custom (line 9) | class HTMLPurifier_ChildDef_Custom extends HTMLPurifier_ChildDef
method __construct (line 25) | public function __construct($dtd_regex) {
method _compileRegex (line 32) | protected function _compileRegex() {
method validateChildren (line 60) | public function validateChildren($tokens_of_children, $config, $contex...
FILE: libraries/purifier/HTMLPurifier/ChildDef/Empty.php
class HTMLPurifier_ChildDef_Empty (line 10) | class HTMLPurifier_ChildDef_Empty extends HTMLPurifier_ChildDef
method __construct (line 14) | public function __construct() {}
method validateChildren (line 15) | public function validateChildren($tokens_of_children, $config, $contex...
FILE: libraries/purifier/HTMLPurifier/ChildDef/Optional.php
class HTMLPurifier_ChildDef_Optional (line 10) | class HTMLPurifier_ChildDef_Optional extends HTMLPurifier_ChildDef_Required
method validateChildren (line 14) | public function validateChildren($tokens_of_children, $config, $contex...
FILE: libraries/purifier/HTMLPurifier/ChildDef/Required.php
class HTMLPurifier_ChildDef_Required (line 6) | class HTMLPurifier_ChildDef_Required extends HTMLPurifier_ChildDef
method __construct (line 20) | public function __construct($elements) {
method validateChildren (line 37) | public function validateChildren($tokens_of_children, $config, $contex...
FILE: libraries/purifier/HTMLPurifier/ChildDef/StrictBlockquote.php
class HTMLPurifier_ChildDef_StrictBlockquote (line 6) | class HTMLPurifier_ChildDef_StrictBlockquote extends HTMLPurifier_ChildD...
method getAllowedElements (line 18) | public function getAllowedElements($config) {
method validateChildren (line 23) | public function validateChildren($tokens_of_children, $config, $contex...
method init (line 76) | private function init($config) {
FILE: libraries/purifier/HTMLPurifier/ChildDef/Table.php
class HTMLPurifier_ChildDef_Table (line 6) | class HTMLPurifier_ChildDef_Table extends HTMLPurifier_ChildDef
method __construct (line 12) | public function __construct() {}
method validateChildren (line 13) | public function validateChildren($tokens_of_children, $config, $contex...
FILE: libraries/purifier/HTMLPurifier/Config.php
class HTMLPurifier_Config (line 17) | class HTMLPurifier_Config
method __construct (line 92) | public function __construct($definition, $parent = null) {
method create (line 108) | public static function create($config, $schema = null) {
method inherit (line 129) | public static function inherit(HTMLPurifier_Config $config) {
method createDefault (line 137) | public static function createDefault() {
method get (line 147) | public function get($key, $a = null) {
method getBatch (line 179) | public function getBatch($namespace) {
method getBatchSerial (line 197) | public function getBatchSerial($namespace) {
method getSerial (line 210) | public function getSerial() {
method getAll (line 221) | public function getAll() {
method set (line 236) | public function set($key, $value, $a = null) {
method _listify (line 311) | private function _listify($lookup) {
method getHTMLDefinition (line 322) | public function getHTMLDefinition($raw = false) {
method getCSSDefinition (line 331) | public function getCSSDefinition($raw = false) {
method getDefinition (line 340) | public function getDefinition($type, $raw = false) {
method loadArray (line 402) | public function loadArray($config_array) {
method getAllowedDirectivesForForm (line 424) | public static function getAllowedDirectivesForForm($allowed, $schema =...
method loadArrayFromForm (line 470) | public static function loadArrayFromForm($array, $index = false, $allo...
method mergeArrayFromForm (line 480) | public function mergeArrayFromForm($array, $index = false, $allowed = ...
method prepareArrayFromForm (line 489) | public static function prepareArrayFromForm($array, $index = false, $a...
method loadIni (line 513) | public function loadIni($filename) {
method isFinalized (line 523) | public function isFinalized($error = false) {
method autoFinalize (line 534) | public function autoFinalize() {
method finalize (line 545) | public function finalize() {
method triggerError (line 555) | protected function triggerError($msg, $no) {
method serialize (line 571) | public function serialize() {
FILE: libraries/purifier/HTMLPurifier/ConfigSchema.php
class HTMLPurifier_ConfigSchema (line 6) | class HTMLPurifier_ConfigSchema {
method __construct (line 55) | public function __construct() {
method makeFromSerial (line 62) | public static function makeFromSerial() {
method instance (line 69) | public static function instance($prototype = null) {
method add (line 90) | public function add($key, $default, $type, $allow_null) {
method addValueAliases (line 108) | public function addValueAliases($key, $aliases) {
method addAllowedValues (line 125) | public function addAllowedValues($key, $allowed) {
method addAlias (line 136) | public function addAlias($key, $new_key) {
method postProcess (line 146) | public function postProcess() {
FILE: libraries/purifier/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php
class HTMLPurifier_ConfigSchema_Builder_ConfigSchema (line 7) | class HTMLPurifier_ConfigSchema_Builder_ConfigSchema
method build (line 10) | public function build($interchange) {
FILE: libraries/purifier/HTMLPurifier/ConfigSchema/Builder/Xml.php
class HTMLPurifier_ConfigSchema_Builder_Xml (line 7) | class HTMLPurifier_ConfigSchema_Builder_Xml extends XMLWriter
method writeHTMLDiv (line 13) | protected function writeHTMLDiv($html) {
method export (line 24) | protected function export($var) {
method build (line 29) | public function build($interchange) {
method buildDirective (line 48) | public function buildDirective($directive) {
FILE: libraries/purifier/HTMLPurifier/ConfigSchema/Exception.php
class HTMLPurifier_ConfigSchema_Exception (line 6) | class HTMLPurifier_ConfigSchema_Exception extends HTMLPurifier_Exception
FILE: libraries/purifier/HTMLPurifier/ConfigSchema/Interchange.php
class HTMLPurifier_ConfigSchema_Interchange (line 8) | class HTMLPurifier_ConfigSchema_Interchange
method addDirective (line 24) | public function addDirective($directive) {
method validate (line 35) | public function validate() {
FILE: libraries/purifier/HTMLPurifier/ConfigSchema/Interchange/Directive.php
class HTMLPurifier_ConfigSchema_Interchange_Directive (line 6) | class HTMLPurifier_ConfigSchema_Interchange_Directive
FILE: libraries/purifier/HTMLPurifier/ConfigSchema/Interchange/Id.php
class HTMLPurifier_ConfigSchema_Interchange_Id (line 6) | class HTMLPurifier_ConfigSchema_Interchange_Id
method __construct (line 11) | public function __construct($key) {
method toString (line 19) | public function toString() {
method getRootNamespace (line 23) | public function getRootNamespace() {
method getDirective (line 27) | public function getDirective() {
method make (line 31) | public static function make($id) {
FILE: libraries/purifier/HTMLPurifier/ConfigSchema/InterchangeBuilder.php
class HTMLPurifier_ConfigSchema_InterchangeBuilder (line 3) | class HTMLPurifier_ConfigSchema_InterchangeBuilder
method __construct (line 11) | public function __construct($varParser = null) {
method buildFromDirectory (line 15) | public static function buildFromDirectory($dir = null) {
method buildDir (line 21) | public function buildDir($interchange, $dir = null) {
method buildFile (line 46) | public function buildFile($interchange, $file) {
method build (line 59) | public function build($interchange, $hash) {
method buildDirective (line 78) | public function buildDirective($interchange, $hash) {
method evalArray (line 143) | protected function evalArray($contents) {
method lookup (line 150) | protected function lookup($array) {
method id (line 160) | protected function id($id) {
method _findUnused (line 169) | protected function _findUnused($hash) {
FILE: libraries/purifier/HTMLPurifier/ConfigSchema/Validator.php
class HTMLPurifier_ConfigSchema_Validator (line 11) | class HTMLPurifier_ConfigSchema_Validator
method __construct (line 29) | public function __construct() {
method validate (line 37) | public function validate($interchange) {
method validateId (line 53) | public function validateId($id) {
method validateDirective (line 71) | public function validateDirective($d) {
method validateDirectiveAllowed (line 112) | public function validateDirectiveAllowed($d) {
method validateDirectiveValueAliases (line 131) | public function validateDirectiveValueAliases($d) {
method validateDirectiveAliases (line 159) | public function validateDirectiveAliases($d) {
method with (line 184) | protected function with($obj, $member) {
method error (line 191) | protected function error($target, $msg) {
method getFormattedContext (line 200) | protected function getFormattedContext() {
FILE: libraries/purifier/HTMLPurifier/ConfigSchema/ValidatorAtom.php
class HTMLPurifier_ConfigSchema_ValidatorAtom (line 9) | class HTMLPurifier_ConfigSchema_ValidatorAtom
method __construct (line 14) | public function __construct($context, $obj, $member) {
method assertIsString (line 21) | public function assertIsString() {
method assertIsBool (line 26) | public function assertIsBool() {
method assertIsArray (line 31) | public function assertIsArray() {
method assertNotNull (line 36) | public function assertNotNull() {
method assertAlnum (line 41) | public function assertAlnum() {
method assertNotEmpty (line 47) | public function assertNotEmpty() {
method assertIsLookup (line 52) | public function assertIsLookup() {
method error (line 60) | protected function error($msg) {
FILE: libraries/purifier/HTMLPurifier/ContentSets.php
class HTMLPurifier_ContentSets (line 6) | class HTMLPurifier_ContentSets
method __construct (line 34) | public function __construct($modules) {
method generateChildDef (line 76) | public function generateChildDef(&$def, $module) {
method generateChildDefCallback (line 92) | public function generateChildDefCallback($matches) {
method getChildDef (line 104) | public function getChildDef($def, $module) {
method convertToLookup (line 144) | protected function convertToLookup($string) {
FILE: libraries/purifier/HTMLPurifier/Context.php
class HTMLPurifier_Context (line 10) | class HTMLPurifier_Context
method register (line 23) | public function register($name, &$ref) {
method get (line 37) | public function &get($name, $ignore_error = false) {
method destroy (line 53) | public function destroy($name) {
method exists (line 66) | public function exists($name) {
method loadArray (line 74) | public function loadArray($context_array) {
FILE: libraries/purifier/HTMLPurifier/Definition.php
class HTMLPurifier_Definition (line 7) | abstract class HTMLPurifier_Definition
method doSetup (line 25) | abstract protected function doSetup($config);
method setup (line 31) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/DefinitionCache.php
class HTMLPurifier_DefinitionCache (line 11) | abstract class HTMLPurifier_DefinitionCache
method __construct (line 20) | public function __construct($type) {
method generateKey (line 28) | public function generateKey($config) {
method isOld (line 40) | public function isOld($key, $config) {
method checkDefType (line 60) | public function checkDefType($def) {
method add (line 71) | abstract public function add($def, $config);
method set (line 76) | abstract public function set($def, $config);
method replace (line 81) | abstract public function replace($def, $config);
method get (line 86) | abstract public function get($config);
method remove (line 91) | abstract public function remove($config);
method flush (line 96) | abstract public function flush($config);
method cleanup (line 104) | abstract public function cleanup($config);
FILE: libraries/purifier/HTMLPurifier/DefinitionCache/Decorator.php
class HTMLPurifier_DefinitionCache_Decorator (line 3) | class HTMLPurifier_DefinitionCache_Decorator extends HTMLPurifier_Defini...
method __construct (line 11) | public function __construct() {}
method decorate (line 17) | public function decorate(&$cache) {
method copy (line 28) | public function copy() {
method add (line 32) | public function add($def, $config) {
method set (line 36) | public function set($def, $config) {
method replace (line 40) | public function replace($def, $config) {
method get (line 44) | public function get($config) {
method remove (line 48) | public function remove($config) {
method flush (line 52) | public function flush($config) {
method cleanup (line 56) | public function cleanup($config) {
FILE: libraries/purifier/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php
class HTMLPurifier_DefinitionCache_Decorator_Cleanup (line 7) | class HTMLPurifier_DefinitionCache_Decorator_Cleanup extends
method copy (line 13) | public function copy() {
method add (line 17) | public function add($def, $config) {
method set (line 23) | public function set($def, $config) {
method replace (line 29) | public function replace($def, $config) {
method get (line 35) | public function get($config) {
FILE: libraries/purifier/HTMLPurifier/DefinitionCache/Decorator/Memory.php
class HTMLPurifier_DefinitionCache_Decorator_Memory (line 8) | class HTMLPurifier_DefinitionCache_Decorator_Memory extends
method copy (line 15) | public function copy() {
method add (line 19) | public function add($def, $config) {
method set (line 25) | public function set($def, $config) {
method replace (line 31) | public function replace($def, $config) {
method get (line 37) | public function get($config) {
FILE: libraries/purifier/HTMLPurifier/DefinitionCache/Null.php
class HTMLPurifier_DefinitionCache_Null (line 6) | class HTMLPurifier_DefinitionCache_Null extends HTMLPurifier_DefinitionC...
method add (line 9) | public function add($def, $config) {
method set (line 13) | public function set($def, $config) {
method replace (line 17) | public function replace($def, $config) {
method remove (line 21) | public function remove($config) {
method get (line 25) | public function get($config) {
method flush (line 29) | public function flush($config) {
method cleanup (line 33) | public function cleanup($config) {
FILE: libraries/purifier/HTMLPurifier/DefinitionCache/Serializer.php
class HTMLPurifier_DefinitionCache_Serializer (line 3) | class HTMLPurifier_DefinitionCache_Serializer extends
method add (line 7) | public function add($def, $config) {
method set (line 15) | public function set($def, $config) {
method replace (line 22) | public function replace($def, $config) {
method get (line 30) | public function get($config) {
method remove (line 36) | public function remove($config) {
method flush (line 42) | public function flush($config) {
method cleanup (line 53) | public function cleanup($config) {
method generateFilePath (line 70) | public function generateFilePath($config) {
method generateDirectoryPath (line 80) | public function generateDirectoryPath($config) {
method generateBaseDirectoryPath (line 90) | public function generateBaseDirectoryPath($config) {
method _write (line 102) | private function _write($file, $data) {
method _prepareDir (line 110) | private function _prepareDir($config) {
method _testPermissions (line 135) | private function _testPermissions($dir) {
FILE: libraries/purifier/HTMLPurifier/DefinitionCacheFactory.php
class HTMLPurifier_DefinitionCacheFactory (line 6) | class HTMLPurifier_DefinitionCacheFactory
method setup (line 16) | public function setup() {
method instance (line 23) | public static function instance($prototype = null) {
method register (line 39) | public function register($short, $long) {
method create (line 48) | public function create($type, $config) {
method addDecorator (line 81) | public function addDecorator($decorator) {
FILE: libraries/purifier/HTMLPurifier/Doctype.php
class HTMLPurifier_Doctype (line 9) | class HTMLPurifier_Doctype
method __construct (line 47) | public function __construct($name = null, $xml = true, $modules = arra...
FILE: libraries/purifier/HTMLPurifier/DoctypeRegistry.php
class HTMLPurifier_DoctypeRegistry (line 3) | class HTMLPurifier_DoctypeRegistry
method register (line 26) | public function register($doctype, $xml = true, $modules = array(),
method get (line 56) | public function get($doctype) {
method make (line 74) | public function make($config) {
method getDoctypeFromConfig (line 81) | public function getDoctypeFromConfig($config) {
FILE: libraries/purifier/HTMLPurifier/ElementDef.php
class HTMLPurifier_ElementDef (line 11) | class HTMLPurifier_ElementDef
method create (line 109) | public static function create($content_model, $content_model_type, $at...
method mergeIn (line 122) | public function mergeIn($def) {
method _mergeAssocArray (line 164) | private function _mergeAssocArray(&$a1, $a2) {
FILE: libraries/purifier/HTMLPurifier/Encoder.php
class HTMLPurifier_Encoder (line 7) | class HTMLPurifier_Encoder
method __construct (line 13) | private function __construct() {
method muteErrorHandler (line 20) | public static function muteErrorHandler() {}
method cleanUTF8 (line 47) | public static function cleanUTF8($str, $force_php = false) {
method unichr (line 226) | public static function unichr($code) {
method convertToUTF8 (line 266) | public static function convertToUTF8($str, $config, $context) {
method convertFromUTF8 (line 299) | public static function convertFromUTF8($str, $config, $context) {
method convertToASCIIDumbLossless (line 345) | public static function convertToASCIIDumbLossless($str) {
method testEncodingSupportsASCII (line 387) | public static function testEncodingSupportsASCII($encoding, $bypass = ...
FILE: libraries/purifier/HTMLPurifier/EntityLookup.php
class HTMLPurifier_EntityLookup (line 6) | class HTMLPurifier_EntityLookup {
method setup (line 19) | public function setup($file = false) {
method instance (line 30) | public static function instance($prototype = false) {
FILE: libraries/purifier/HTMLPurifier/EntityParser.php
class HTMLPurifier_EntityParser (line 10) | class HTMLPurifier_EntityParser
method substituteNonSpecialEntities (line 57) | public function substituteNonSpecialEntities($string) {
method nonSpecialEntityCallback (line 75) | protected function nonSpecialEntityCallback($matches) {
method substituteSpecialEntities (line 109) | public function substituteSpecialEntities($string) {
method specialEntityCallback (line 126) | protected function specialEntityCallback($matches) {
FILE: libraries/purifier/HTMLPurifier/ErrorCollector.php
class HTMLPurifier_ErrorCollector (line 7) | class HTMLPurifier_ErrorCollector
method __construct (line 28) | public function __construct($context) {
method send (line 42) | public function send($severity, $msg) {
method getRaw (line 135) | public function getRaw() {
method getHTMLFormatted (line 144) | public function getHTMLFormatted($config, $errors = null) {
method _renderStruct (line 171) | private function _renderStruct(&$ret, $struct, $line = null, $col = nu...
FILE: libraries/purifier/HTMLPurifier/ErrorStruct.php
class HTMLPurifier_ErrorStruct (line 9) | class HTMLPurifier_ErrorStruct
method getChild (line 46) | public function getChild($type, $id) {
method addError (line 54) | public function addError($severity, $message) {
FILE: libraries/purifier/HTMLPurifier/Exception.php
class HTMLPurifier_Exception (line 7) | class HTMLPurifier_Exception extends Exception
FILE: libraries/purifier/HTMLPurifier/Filter.php
class HTMLPurifier_Filter (line 22) | class HTMLPurifier_Filter
method preFilter (line 33) | public function preFilter($html, $config, $context) {
method postFilter (line 40) | public function postFilter($html, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/Filter/ExtractStyleBlocks.php
class HTMLPurifier_Filter_ExtractStyleBlocks (line 17) | class HTMLPurifier_Filter_ExtractStyleBlocks extends HTMLPurifier_Filter
method __construct (line 24) | public function __construct() {
method styleCallback (line 32) | protected function styleCallback($matches) {
method preFilter (line 40) | public function preFilter($html, $config, $context) {
method cleanCSS (line 63) | public function cleanCSS($css, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/Filter/YouTube.php
class HTMLPurifier_Filter_YouTube (line 3) | class HTMLPurifier_Filter_YouTube extends HTMLPurifier_Filter
method preFilter (line 8) | public function preFilter($html, $config, $context) {
method postFilter (line 15) | public function postFilter($html, $config, $context) {
method armorUrl (line 20) | protected function armorUrl($url) {
method postFilterCallback (line 24) | protected function postFilterCallback($matches) {
FILE: libraries/purifier/HTMLPurifier/Generator.php
class HTMLPurifier_Generator (line 10) | class HTMLPurifier_Generator
method __construct (line 43) | public function __construct($config, $context) {
method generateFromTokens (line 57) | public function generateFromTokens($tokens) {
method generateFromToken (line 100) | public function generateFromToken($token) {
method generateScriptFromToken (line 134) | public function generateScriptFromToken($token) {
method generateAttributes (line 149) | public function generateAttributes($assoc_array_of_attributes, $elemen...
method escape (line 177) | public function escape($string, $quote = ENT_COMPAT) {
FILE: libraries/purifier/HTMLPurifier/HTMLDefinition.php
class HTMLPurifier_HTMLDefinition (line 26) | class HTMLPurifier_HTMLDefinition extends HTMLPurifier_Definition
method addAttribute (line 102) | public function addAttribute($element_name, $attr_name, $def) {
method addElement (line 117) | public function addElement($element_name, $type, $contents, $attr_coll...
method addBlankElement (line 131) | public function addBlankElement($element_name) {
method getAnonymousModule (line 142) | public function getAnonymousModule() {
method __construct (line 161) | public function __construct() {
method doSetup (line 165) | protected function doSetup($config) {
method processModules (line 180) | protected function processModules($config) {
method setupConfigStuff (line 220) | protected function setupConfigStuff($config) {
method parseTinyMCEAllowedList (line 387) | public function parseTinyMCEAllowedList($list) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule.php
class HTMLPurifier_HTMLModule (line 18) | class HTMLPurifier_HTMLModule
method getChildDef (line 112) | public function getChildDef($def) {return false;}
method addElement (line 130) | public function addElement($element, $type, $contents, $attr_includes ...
method addBlankElement (line 153) | public function addBlankElement($element) {
method addElementToContentSet (line 170) | public function addElementToContentSet($element, $type) {
method parseContents (line 185) | public function parseContents($contents) {
method mergeInAttrIncludes (line 208) | public function mergeInAttrIncludes(&$attr, $attr_includes) {
method makeLookup (line 224) | public function makeLookup($list) {
method setup (line 240) | public function setup($config) {}
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Bdo.php
class HTMLPurifier_HTMLModule_Bdo (line 7) | class HTMLPurifier_HTMLModule_Bdo extends HTMLPurifier_HTMLModule
method setup (line 15) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/CommonAttributes.php
class HTMLPurifier_HTMLModule_CommonAttributes (line 3) | class HTMLPurifier_HTMLModule_CommonAttributes extends HTMLPurifier_HTML...
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Edit.php
class HTMLPurifier_HTMLModule_Edit (line 7) | class HTMLPurifier_HTMLModule_Edit extends HTMLPurifier_HTMLModule
method setup (line 12) | public function setup($config) {
method getChildDef (line 30) | public function getChildDef($def) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Forms.php
class HTMLPurifier_HTMLModule_Forms (line 6) | class HTMLPurifier_HTMLModule_Forms extends HTMLPurifier_HTMLModule
method setup (line 16) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Hypertext.php
class HTMLPurifier_HTMLModule_Hypertext (line 6) | class HTMLPurifier_HTMLModule_Hypertext extends HTMLPurifier_HTMLModule
method setup (line 11) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Image.php
class HTMLPurifier_HTMLModule_Image (line 8) | class HTMLPurifier_HTMLModule_Image extends HTMLPurifier_HTMLModule
method setup (line 13) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Legacy.php
class HTMLPurifier_HTMLModule_Legacy (line 19) | class HTMLPurifier_HTMLModule_Legacy extends HTMLPurifier_HTMLModule
method setup (line 24) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/List.php
class HTMLPurifier_HTMLModule_List (line 6) | class HTMLPurifier_HTMLModule_List extends HTMLPurifier_HTMLModule
method setup (line 22) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Name.php
class HTMLPurifier_HTMLModule_Name (line 3) | class HTMLPurifier_HTMLModule_Name extends HTMLPurifier_HTMLModule
method setup (line 8) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php
class HTMLPurifier_HTMLModule_NonXMLCommonAttributes (line 3) | class HTMLPurifier_HTMLModule_NonXMLCommonAttributes extends HTMLPurifie...
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Object.php
class HTMLPurifier_HTMLModule_Object (line 8) | class HTMLPurifier_HTMLModule_Object extends HTMLPurifier_HTMLModule
method setup (line 14) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Presentation.php
class HTMLPurifier_HTMLModule_Presentation (line 13) | class HTMLPurifier_HTMLModule_Presentation extends HTMLPurifier_HTMLModule
method setup (line 18) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Proprietary.php
class HTMLPurifier_HTMLModule_Proprietary (line 7) | class HTMLPurifier_HTMLModule_Proprietary extends HTMLPurifier_HTMLModule
method setup (line 12) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Ruby.php
class HTMLPurifier_HTMLModule_Ruby (line 7) | class HTMLPurifier_HTMLModule_Ruby extends HTMLPurifier_HTMLModule
method setup (line 12) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/SafeEmbed.php
class HTMLPurifier_HTMLModule_SafeEmbed (line 6) | class HTMLPurifier_HTMLModule_SafeEmbed extends HTMLPurifier_HTMLModule
method setup (line 11) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/SafeObject.php
class HTMLPurifier_HTMLModule_SafeObject (line 9) | class HTMLPurifier_HTMLModule_SafeObject extends HTMLPurifier_HTMLModule
method setup (line 14) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Scripting.php
class HTMLPurifier_HTMLModule_Scripting (line 16) | class HTMLPurifier_HTMLModule_Scripting extends HTMLPurifier_HTMLModule
method setup (line 23) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/StyleAttribute.php
class HTMLPurifier_HTMLModule_StyleAttribute (line 7) | class HTMLPurifier_HTMLModule_StyleAttribute extends HTMLPurifier_HTMLMo...
method setup (line 18) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Tables.php
class HTMLPurifier_HTMLModule_Tables (line 6) | class HTMLPurifier_HTMLModule_Tables extends HTMLPurifier_HTMLModule
method setup (line 11) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Target.php
class HTMLPurifier_HTMLModule_Target (line 6) | class HTMLPurifier_HTMLModule_Target extends HTMLPurifier_HTMLModule
method setup (line 11) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Text.php
class HTMLPurifier_HTMLModule_Text (line 15) | class HTMLPurifier_HTMLModule_Text extends HTMLPurifier_HTMLModule
method setup (line 23) | public function setup($config) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Tidy.php
class HTMLPurifier_HTMLModule_Tidy (line 8) | class HTMLPurifier_HTMLModule_Tidy extends HTMLPurifier_HTMLModule
method setup (line 38) | public function setup($config) {
method getFixesForLevel (line 73) | public function getFixesForLevel($level) {
method makeFixesForLevel (line 103) | public function makeFixesForLevel($fixes) {
method populate (line 120) | public function populate($fixes) {
method getFixType (line 172) | public function getFixType($name) {
method makeFixes (line 203) | public function makeFixes() {}
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Tidy/Name.php
class HTMLPurifier_HTMLModule_Tidy_Name (line 6) | class HTMLPurifier_HTMLModule_Tidy_Name extends HTMLPurifier_HTMLModule_...
method makeFixes (line 10) | public function makeFixes() {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Tidy/Proprietary.php
class HTMLPurifier_HTMLModule_Tidy_Proprietary (line 3) | class HTMLPurifier_HTMLModule_Tidy_Proprietary extends HTMLPurifier_HTML...
method makeFixes (line 9) | public function makeFixes() {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Tidy/Strict.php
class HTMLPurifier_HTMLModule_Tidy_Strict (line 3) | class HTMLPurifier_HTMLModule_Tidy_Strict extends HTMLPurifier_HTMLModul...
method makeFixes (line 8) | public function makeFixes() {
method getChildDef (line 15) | public function getChildDef($def) {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Tidy/Transitional.php
class HTMLPurifier_HTMLModule_Tidy_Transitional (line 3) | class HTMLPurifier_HTMLModule_Tidy_Transitional extends HTMLPurifier_HTM...
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Tidy/XHTML.php
class HTMLPurifier_HTMLModule_Tidy_XHTML (line 3) | class HTMLPurifier_HTMLModule_Tidy_XHTML extends HTMLPurifier_HTMLModule...
method makeFixes (line 9) | public function makeFixes() {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php
class HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 (line 3) | class HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 extends HTMLPurifier_HT...
method makeFixes (line 6) | public function makeFixes() {
FILE: libraries/purifier/HTMLPurifier/HTMLModule/XMLCommonAttributes.php
class HTMLPurifier_HTMLModule_XMLCommonAttributes (line 3) | class HTMLPurifier_HTMLModule_XMLCommonAttributes extends HTMLPurifier_H...
FILE: libraries/purifier/HTMLPurifier/HTMLModuleManager.php
class HTMLPurifier_HTMLModuleManager (line 3) | class HTMLPurifier_HTMLModuleManager
method __construct (line 56) | public function __construct() {
method registerModule (line 145) | public function registerModule($module, $overload = false) {
method addModule (line 181) | public function addModule($module) {
method addPrefix (line 191) | public function addPrefix($prefix) {
method setup (line 200) | public function setup($config) {
method processModule (line 288) | public function processModule($module) {
method getElements (line 299) | public function getElements() {
method getElement (line 330) | public function getElement($name, $trusted = null) {
FILE: libraries/purifier/HTMLPurifier/IDAccumulator.php
class HTMLPurifier_IDAccumulator (line 9) | class HTMLPurifier_IDAccumulator
method build (line 24) | public static function build($config, $context) {
method add (line 35) | public function add($id) {
method load (line 45) | public function load($array_of_ids) {
FILE: libraries/purifier/HTMLPurifier/Injector.php
class HTMLPurifier_Injector (line 16) | abstract class HTMLPurifier_Injector
method rewind (line 68) | public function rewind($index) {
method getRewind (line 75) | public function getRewind() {
method prepare (line 90) | public function prepare($config, $context) {
method checkNeeded (line 111) | public function checkNeeded($config) {
method allowsElement (line 129) | public function allowsElement($name) {
method forward (line 157) | protected function forward(&$i, &$current) {
method forwardUntilEndToken (line 170) | protected function forwardUntilEndToken(&$i, &$current, &$nesting) {
method backward (line 190) | protected function backward(&$i, &$current) {
method current (line 207) | protected function current(&$i, &$current) {
method handleText (line 215) | public function handleText(&$token) {}
method handleElement (line 220) | public function handleElement(&$token) {}
method handleEnd (line 225) | public function handleEnd(&$token) {
method notifyEnd (line 234) | public function notifyEnd($token) {}
FILE: libraries/purifier/HTMLPurifier/Injector/AutoParagraph.php
class HTMLPurifier_Injector_AutoParagraph (line 9) | class HTMLPurifier_Injector_AutoParagraph extends HTMLPurifier_Injector
method _pStart (line 15) | private function _pStart() {
method handleText (line 21) | public function handleText(&$token) {
method handleElement (line 92) | public function handleElement(&$token) {
method _splitText (line 206) | private function _splitText($data, &$result) {
method _isInline (line 290) | private function _isInline($token) {
method _pLookAhead (line 298) | private function _pLookAhead() {
method _checkNeedsP (line 317) | private function _checkNeedsP($current) {
FILE: libraries/purifier/HTMLPurifier/Injector/DisplayLinkURI.php
class HTMLPurifier_Injector_DisplayLinkURI (line 6) | class HTMLPurifier_Injector_DisplayLinkURI extends HTMLPurifier_Injector
method handleElement (line 12) | public function handleElement(&$token) {
method handleEnd (line 15) | public function handleEnd(&$token) {
FILE: libraries/purifier/HTMLPurifier/Injector/Linkify.php
class HTMLPurifier_Injector_Linkify (line 6) | class HTMLPurifier_Injector_Linkify extends HTMLPurifier_Injector
method handleText (line 12) | public function handleText(&$token) {
FILE: libraries/purifier/HTMLPurifier/Injector/PurifierLinkify.php
class HTMLPurifier_Injector_PurifierLinkify (line 7) | class HTMLPurifier_Injector_PurifierLinkify extends HTMLPurifier_Injector
method prepare (line 14) | public function prepare($config, $context) {
method handleText (line 19) | public function handleText(&$token) {
FILE: libraries/purifier/HTMLPurifier/Injector/RemoveEmpty.php
class HTMLPurifier_Injector_RemoveEmpty (line 3) | class HTMLPurifier_Injector_RemoveEmpty extends HTMLPurifier_Injector
method prepare (line 8) | public function prepare($config, $context) {
method handleElement (line 17) | public function handleElement(&$token) {
FILE: libraries/purifier/HTMLPurifier/Injector/SafeObject.php
class HTMLPurifier_Injector_SafeObject (line 7) | class HTMLPurifier_Injector_SafeObject extends HTMLPurifier_Injector
method prepare (line 25) | public function prepare($config, $context) {
method handleElement (line 29) | public function handleElement(&$token) {
method handleEnd (line 75) | public function handleEnd(&$token) {
FILE: libraries/purifier/HTMLPurifier/Language.php
class HTMLPurifier_Language (line 7) | class HTMLPurifier_Language
method __construct (line 48) | public function __construct($config, $context) {
method load (line 57) | public function load() {
method getMessage (line 72) | public function getMessage($key) {
method getErrorName (line 84) | public function getErrorName($int) {
method listify (line 93) | public function listify($array) {
method formatMessage (line 117) | public function formatMessage($key, $args = array()) {
FILE: libraries/purifier/HTMLPurifier/Language/classes/en-x-test.php
class HTMLPurifier_Language_en_x_test (line 5) | class HTMLPurifier_Language_en_x_test extends HTMLPurifier_Language
FILE: libraries/purifier/HTMLPurifier/LanguageFactory.php
class HTMLPurifier_LanguageFactory (line 10) | class HTMLPurifier_LanguageFactory
method instance (line 57) | public static function instance($prototype = null) {
method setup (line 72) | public function setup() {
method create (line 83) | public function create($config, $context, $code = false) {
method getFallbackFor (line 129) | public function getFallbackFor($code) {
method loadLanguage (line 138) | public function loadLanguage($code) {
FILE: libraries/purifier/HTMLPurifier/Length.php
class HTMLPurifier_Length (line 7) | class HTMLPurifier_Length
method __construct (line 37) | public function __construct($n = '0', $u = false) {
method make (line 46) | static public function make($s) {
method validate (line 58) | protected function validate() {
method toString (line 75) | public function toString() {
method getN (line 83) | public function getN() {return $this->n;}
method getUnit (line 88) | public function getUnit() {return $this->unit;}
method isValid (line 93) | public function isValid() {
method compareTo (line 103) | public function compareTo($l) {
FILE: libraries/purifier/HTMLPurifier/Lexer.php
class HTMLPurifier_Lexer (line 42) | class HTMLPurifier_Lexer
method create (line 68) | public static function create($config) {
method __construct (line 142) | public function __construct() {
method parseData (line 174) | public function parseData($string) {
method tokenizeHTML (line 204) | public function tokenizeHTML($string, $config, $context) {
method escapeCDATA (line 214) | protected static function escapeCDATA($string) {
method escapeCommentedCDATA (line 225) | protected static function escapeCommentedCDATA($string) {
method CDATACallback (line 242) | protected static function CDATACallback($matches) {
method normalize (line 252) | public function normalize($html, $config, $context) {
method extractBody (line 286) | public function extractBody($html) {
FILE: libraries/purifier/HTMLPurifier/Lexer/DOMLex.php
class HTMLPurifier_Lexer_DOMLex (line 27) | class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer
method __construct (line 32) | public function __construct() {
method tokenizeHTML (line 38) | public function tokenizeHTML($html, $config, $context) {
method tokenizeDOM (line 84) | protected function tokenizeDOM($node, &$tokens, $collect = false) {
method transformAttrToAssoc (line 157) | protected function transformAttrToAssoc($node_map) {
method muteErrorHandler (line 172) | public function muteErrorHandler($errno, $errstr) {}
method callbackUndoCommentSubst (line 178) | public function callbackUndoCommentSubst($matches) {
method callbackArmorCommentEntities (line 186) | public function callbackArmorCommentEntities($matches) {
method wrapHTML (line 193) | protected function wrapHTML($html, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/Lexer/DirectLex.php
class HTMLPurifier_Lexer_DirectLex (line 13) | class HTMLPurifier_Lexer_DirectLex extends HTMLPurifier_Lexer
method scriptCallback (line 27) | protected function scriptCallback($matches) {
method tokenizeHTML (line 31) | public function tokenizeHTML($html, $config, $context) {
method substrCount (line 323) | protected function substrCount($haystack, $needle, $offset, $length) {
method parseAttributeString (line 342) | public function parseAttributeString($string, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/Lexer/PEARSax3.php
class HTMLPurifier_Lexer_PEARSax3 (line 22) | class HTMLPurifier_Lexer_PEARSax3 extends HTMLPurifier_Lexer
method tokenizeHTML (line 30) | public function tokenizeHTML($string, $config, $context) {
method openHandler (line 54) | public function openHandler(&$parser, $name, $attrs, $closed) {
method closeHandler (line 70) | public function closeHandler(&$parser, $name) {
method dataHandler (line 84) | public function dataHandler(&$parser, $data) {
method escapeHandler (line 92) | public function escapeHandler(&$parser, $data) {
FILE: libraries/purifier/HTMLPurifier/Lexer/PH5P.php
class HTMLPurifier_Lexer_PH5P (line 13) | class HTMLPurifier_Lexer_PH5P extends HTMLPurifier_Lexer_DOMLex {
method tokenizeHTML (line 15) | public function tokenizeHTML($html, $config, $context) {
class HTML5 (line 63) | class HTML5 {
method __construct (line 127) | public function __construct($data) {
method save (line 144) | public function save() {
method char (line 148) | private function char() {
method character (line 154) | private function character($s, $l = 0) {
method characters (line 164) | private function characters($char_class, $start) {
method dataState (line 168) | private function dataState() {
method entityDataState (line 268) | private function entityDataState() {
method tagOpenState (line 284) | private function tagOpenState() {
method closeTagOpenState (line 369) | private function closeTagOpenState() {
method tagNameState (line 442) | private function tagNameState() {
method beforeAttributeNameState (line 486) | private function beforeAttributeNameState() {
method attributeNameState (line 535) | private function attributeNameState() {
method afterAttributeNameState (line 586) | private function afterAttributeNameState() {
method beforeAttributeValueState (line 640) | private function beforeAttributeValueState() {
method attributeValueDoubleQuotedState (line 688) | private function attributeValueDoubleQuotedState() {
method attributeValueSingleQuotedState (line 723) | private function attributeValueSingleQuotedState() {
method attributeValueUnquotedState (line 758) | private function attributeValueUnquotedState() {
method entityInAttributeValueState (line 794) | private function entityInAttributeValueState() {
method bogusCommentState (line 809) | private function bogusCommentState() {
method markupDeclarationOpenState (line 835) | private function markupDeclarationOpenState() {
method commentState (line 863) | private function commentState() {
method commentDashState (line 889) | private function commentDashState() {
method commentEndState (line 916) | private function commentEndState() {
method doctypeState (line 939) | private function doctypeState() {
method beforeDoctypeNameState (line 953) | private function beforeDoctypeNameState() {
method doctypeNameState (line 1000) | private function doctypeNameState() {
method afterDoctypeNameState (line 1029) | private function afterDoctypeNameState() {
method bogusDoctypeState (line 1052) | private function bogusDoctypeState() {
method entity (line 1071) | private function entity() {
method emitToken (line 1161) | private function emitToken($token) {
method EOF (line 1172) | private function EOF() {
class HTML5TreeConstructer (line 1180) | class HTML5TreeConstructer {
method __construct (line 1232) | public function __construct() {
method emitToken (line 1244) | public function emitToken($token) {
method initPhase (line 1253) | private function initPhase($token) {
method rootElementPhase (line 1303) | private function rootElementPhase($token) {
method mainPhase (line 1350) | private function mainPhase($token) {
method beforeHead (line 1400) | private function beforeHead($token) {
method inHead (line 1454) | private function inHead($token) {
method afterHead (line 1578) | private function afterHead($token) {
method inBody (line 1634) | private function inBody($token) {
method inTable (line 2632) | private function inTable($token) {
method inCaption (line 2809) | private function inCaption($token) {
method inColumnGroup (line 2877) | private function inColumnGroup($token) {
method inTableBody (line 2934) | private function inTableBody($token) {
method inRow (line 3020) | private function inRow($token) {
method inCell (line 3105) | private function inCell($token) {
method inSelect (line 3212) | private function inSelect($token) {
method afterBody (line 3361) | private function afterBody($token) {
method inFrameset (line 3400) | private function inFrameset($token) {
method afterFrameset (line 3463) | private function afterFrameset($token) {
method trailingEndPhase (line 3498) | private function trailingEndPhase($token) {
method insertElement (line 3538) | private function insertElement($token, $append = true, $check = false) {
method insertText (line 3564) | private function insertText($data) {
method insertComment (line 3569) | private function insertComment($data) {
method appendToRealParent (line 3574) | private function appendToRealParent($node) {
method elementInScope (line 3602) | private function elementInScope($el, $table = false) {
method reconstructActiveFormattingElements (line 3651) | private function reconstructActiveFormattingElements() {
method clearTheActiveFormattingElementsUpToTheLastMarker (line 3722) | private function clearTheActiveFormattingElementsUpToTheLastMarker() {
method generateImpliedEndTags (line 3743) | private function generateImpliedEndTags($exclude = array()) {
method getElementCategory (line 3757) | private function getElementCategory($node) {
method clearStackToTableContext (line 3772) | private function clearStackToTableContext($elements) {
method resetInsertionMode (line 3789) | private function resetInsertionMode() {
method closeCell (line 3887) | private function closeCell() {
method save (line 3902) | public function save() {
FILE: libraries/purifier/HTMLPurifier/PercentEncoder.php
class HTMLPurifier_PercentEncoder (line 11) | class HTMLPurifier_PercentEncoder
method __construct (line 22) | public function __construct($preserve = false) {
method encode (line 50) | public function encode($string) {
method normalize (line 69) | public function normalize($string) {
FILE: libraries/purifier/HTMLPurifier/Printer.php
class HTMLPurifier_Printer (line 6) | class HTMLPurifier_Printer
method __construct (line 22) | public function __construct() {
method prepareGenerator (line 28) | public function prepareGenerator($config) {
method start (line 45) | protected function start($tag, $attr = array()) {
method end (line 55) | protected function end($tag) {
method element (line 68) | protected function element($tag, $contents, $attr = array(), $escape =...
method elementEmpty (line 74) | protected function elementEmpty($tag, $attr = array()) {
method text (line 80) | protected function text($text) {
method row (line 91) | protected function row($name, $value) {
method escape (line 105) | protected function escape($string) {
method listify (line 116) | protected function listify($array, $polite = false) {
method getClass (line 134) | protected function getClass($obj, $sec_prefix = '') {
FILE: libraries/purifier/HTMLPurifier/Printer/CSSDefinition.php
class HTMLPurifier_Printer_CSSDefinition (line 3) | class HTMLPurifier_Printer_CSSDefinition extends HTMLPurifier_Printer
method render (line 8) | public function render($config) {
FILE: libraries/purifier/HTMLPurifier/Printer/ConfigForm.js
function toggleWriteability (line 1) | function toggleWriteability(id_of_patient, checked) {
FILE: libraries/purifier/HTMLPurifier/Printer/ConfigForm.php
class HTMLPurifier_Printer_ConfigForm (line 6) | class HTMLPurifier_Printer_ConfigForm extends HTMLPurifier_Printer
method __construct (line 36) | public function __construct(
method setTextareaDimensions (line 53) | public function setTextareaDimensions($cols = null, $rows = null) {
method getCSS (line 61) | public static function getCSS() {
method getJavaScript (line 68) | public static function getJavaScript() {
method render (line 78) | public function render($config, $allowed = true, $render_controls = tr...
method renderNamespace (line 127) | protected function renderNamespace($ns, $directives) {
class HTMLPurifier_Printer_ConfigForm_NullDecorator (line 188) | class HTMLPurifier_Printer_ConfigForm_NullDecorator extends HTMLPurifier...
method __construct (line 196) | public function __construct($obj) {
method render (line 200) | public function render($ns, $directive, $value, $name, $config) {
class HTMLPurifier_Printer_ConfigForm_default (line 238) | class HTMLPurifier_Printer_ConfigForm_default extends HTMLPurifier_Print...
method render (line 241) | public function render($ns, $directive, $value, $name, $config) {
class HTMLPurifier_Printer_ConfigForm_bool (line 320) | class HTMLPurifier_Printer_ConfigForm_bool extends HTMLPurifier_Printer {
method render (line 321) | public function render($ns, $directive, $value, $name, $config) {
FILE: libraries/purifier/HTMLPurifier/Printer/HTMLDefinition.php
class HTMLPurifier_Printer_HTMLDefinition (line 3) | class HTMLPurifier_Printer_HTMLDefinition extends HTMLPurifier_Printer
method render (line 11) | public function render($config) {
method renderDoctype (line 32) | protected function renderDoctype() {
method renderEnvironment (line 49) | protected function renderEnvironment() {
method renderContentSets (line 93) | protected function renderContentSets() {
method renderInfo (line 110) | protected function renderInfo() {
method renderChildren (line 170) | protected function renderChildren($def) {
method listifyTagLookup (line 221) | protected function listifyTagLookup($array) {
method listifyObjectList (line 236) | protected function listifyObjectList($array) {
method listifyAttr (line 249) | protected function listifyAttr($array) {
method heavyHeader (line 262) | protected function heavyHeader($text, $num = 1) {
FILE: libraries/purifier/HTMLPurifier/PropertyList.php
class HTMLPurifier_PropertyList (line 6) | class HTMLPurifier_PropertyList
method __construct (line 20) | public function __construct($parent = null) {
method get (line 27) | public function get($name) {
method set (line 37) | public function set($name, $value) {
method has (line 44) | public function has($name) {
method reset (line 52) | public function reset($name = null) {
method squash (line 62) | public function squash($force = false) {
method getParent (line 74) | public function getParent() {
method setParent (line 81) | public function setParent($plist) {
FILE: libraries/purifier/HTMLPurifier/PropertyListIterator.php
class HTMLPurifier_PropertyListIterator (line 6) | class HTMLPurifier_PropertyListIterator extends FilterIterator
method __construct (line 16) | public function __construct(Iterator $iterator, $filter = null) {
method accept (line 22) | public function accept() {
FILE: libraries/purifier/HTMLPurifier/Strategy.php
class HTMLPurifier_Strategy (line 12) | abstract class HTMLPurifier_Strategy
method execute (line 22) | abstract public function execute($tokens, $config, $context);
FILE: libraries/purifier/HTMLPurifier/Strategy/Composite.php
class HTMLPurifier_Strategy_Composite (line 6) | abstract class HTMLPurifier_Strategy_Composite extends HTMLPurifier_Stra...
method __construct (line 14) | abstract public function __construct();
method execute (line 16) | public function execute($tokens, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/Strategy/Core.php
class HTMLPurifier_Strategy_Core (line 6) | class HTMLPurifier_Strategy_Core extends HTMLPurifier_Strategy_Composite
method __construct (line 9) | public function __construct() {
FILE: libraries/purifier/HTMLPurifier/Strategy/FixNesting.php
class HTMLPurifier_Strategy_FixNesting (line 31) | class HTMLPurifier_Strategy_FixNesting extends HTMLPurifier_Strategy
method execute (line 34) | public function execute($tokens, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/Strategy/MakeWellFormed.php
class HTMLPurifier_Strategy_MakeWellFormed (line 6) | class HTMLPurifier_Strategy_MakeWellFormed extends HTMLPurifier_Strategy
method execute (line 39) | public function execute($tokens, $config, $context) {
method processToken (line 406) | protected function processToken($token, $injector = -1) {
method insertBefore (line 436) | private function insertBefore($token) {
method remove (line 444) | private function remove() {
method swap (line 451) | private function swap($token) {
FILE: libraries/purifier/HTMLPurifier/Strategy/RemoveForeignElements.php
class HTMLPurifier_Strategy_RemoveForeignElements (line 11) | class HTMLPurifier_Strategy_RemoveForeignElements extends HTMLPurifier_S...
method execute (line 14) | public function execute($tokens, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/Strategy/ValidateAttributes.php
class HTMLPurifier_Strategy_ValidateAttributes (line 7) | class HTMLPurifier_Strategy_ValidateAttributes extends HTMLPurifier_Stra...
method execute (line 10) | public function execute($tokens, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/StringHash.php
class HTMLPurifier_StringHash (line 11) | class HTMLPurifier_StringHash extends ArrayObject
method offsetGet (line 18) | public function offsetGet($index) {
method getAccessed (line 27) | public function getAccessed() {
method resetAccessed (line 34) | public function resetAccessed() {
FILE: libraries/purifier/HTMLPurifier/StringHashParser.php
class HTMLPurifier_StringHashParser (line 28) | class HTMLPurifier_StringHashParser
method parseFile (line 36) | public function parseFile($file) {
method parseMultiFile (line 48) | public function parseMultiFile($file) {
method parseHandle (line 68) | protected function parseHandle($fh) {
FILE: libraries/purifier/HTMLPurifier/TagTransform.php
class HTMLPurifier_TagTransform (line 6) | abstract class HTMLPurifier_TagTransform
method transform (line 20) | abstract public function transform($tag, $config, $context);
method prependCSS (line 29) | protected function prependCSS(&$attr, $css) {
FILE: libraries/purifier/HTMLPurifier/TagTransform/Font.php
class HTMLPurifier_TagTransform_Font (line 18) | class HTMLPurifier_TagTransform_Font extends HTMLPurifier_TagTransform
method transform (line 40) | public function transform($tag, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/TagTransform/Simple.php
class HTMLPurifier_TagTransform_Simple (line 8) | class HTMLPurifier_TagTransform_Simple extends HTMLPurifier_TagTransform
method __construct (line 17) | public function __construct($transform_to, $style = null) {
method transform (line 22) | public function transform($tag, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/Token.php
class HTMLPurifier_Token (line 6) | class HTMLPurifier_Token {
method __get (line 24) | public function __get($n) {
method position (line 41) | public function position($l = null, $c = null) {
method rawPosition (line 49) | public function rawPosition($l, $c) {
FILE: libraries/purifier/HTMLPurifier/Token/Comment.php
class HTMLPurifier_Token_Comment (line 6) | class HTMLPurifier_Token_Comment extends HTMLPurifier_Token
method __construct (line 15) | public function __construct($data, $line = null, $col = null) {
FILE: libraries/purifier/HTMLPurifier/Token/Empty.php
class HTMLPurifier_Token_Empty (line 6) | class HTMLPurifier_Token_Empty extends HTMLPurifier_Token_Tag
FILE: libraries/purifier/HTMLPurifier/Token/End.php
class HTMLPurifier_Token_End (line 10) | class HTMLPurifier_Token_End extends HTMLPurifier_Token_Tag
FILE: libraries/purifier/HTMLPurifier/Token/Start.php
class HTMLPurifier_Token_Start (line 6) | class HTMLPurifier_Token_Start extends HTMLPurifier_Token_Tag
FILE: libraries/purifier/HTMLPurifier/Token/Tag.php
class HTMLPurifier_Token_Tag (line 6) | class HTMLPurifier_Token_Tag extends HTMLPurifier_Token
method __construct (line 36) | public function __construct($name, $attr = array(), $line = null, $col...
FILE: libraries/purifier/HTMLPurifier/Token/Text.php
class HTMLPurifier_Token_Text (line 12) | class HTMLPurifier_Token_Text extends HTMLPurifier_Token
method __construct (line 24) | public function __construct($data, $line = null, $col = null) {
FILE: libraries/purifier/HTMLPurifier/TokenFactory.php
class HTMLPurifier_TokenFactory (line 14) | class HTMLPurifier_TokenFactory
method __construct (line 27) | public function __construct() {
method createStart (line 41) | public function createStart($name, $attr = array()) {
method createEnd (line 52) | public function createEnd($name) {
method createEmpty (line 64) | public function createEmpty($name, $attr = array()) {
method createText (line 75) | public function createText($data) {
method createComment (line 86) | public function createComment($data) {
FILE: libraries/purifier/HTMLPurifier/URI.php
class HTMLPurifier_URI (line 11) | class HTMLPurifier_URI
method __construct (line 19) | public function __construct($scheme, $userinfo, $host, $port, $path, $...
method getSchemeObj (line 35) | public function getSchemeObj($config, $context) {
method validate (line 63) | public function validate($config, $context) {
method toString (line 150) | public function toString() {
FILE: libraries/purifier/HTMLPurifier/URIDefinition.php
class HTMLPurifier_URIDefinition (line 3) | class HTMLPurifier_URIDefinition extends HTMLPurifier_Definition
method __construct (line 26) | public function __construct() {
method registerFilter (line 34) | public function registerFilter($filter) {
method addFilter (line 38) | public function addFilter($filter, $config) {
method doSetup (line 48) | protected function doSetup($config) {
method setupFilters (line 53) | protected function setupFilters($config) {
method setupMemberVariables (line 63) | protected function setupMemberVariables($config) {
method filter (line 75) | public function filter(&$uri, $config, $context) {
method postFilter (line 83) | public function postFilter(&$uri, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/URIFilter.php
class HTMLPurifier_URIFilter (line 14) | abstract class HTMLPurifier_URIFilter
method prepare (line 30) | public function prepare($config) {return true;}
method filter (line 41) | abstract public function filter(&$uri, $config, $context);
FILE: libraries/purifier/HTMLPurifier/URIFilter/DisableExternal.php
class HTMLPurifier_URIFilter_DisableExternal (line 3) | class HTMLPurifier_URIFilter_DisableExternal extends HTMLPurifier_URIFilter
method prepare (line 7) | public function prepare($config) {
method filter (line 11) | public function filter(&$uri, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/URIFilter/DisableExternalResources.php
class HTMLPurifier_URIFilter_DisableExternalResources (line 3) | class HTMLPurifier_URIFilter_DisableExternalResources extends HTMLPurifi...
method filter (line 6) | public function filter(&$uri, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/URIFilter/HostBlacklist.php
class HTMLPurifier_URIFilter_HostBlacklist (line 3) | class HTMLPurifier_URIFilter_HostBlacklist extends HTMLPurifier_URIFilter
method prepare (line 7) | public function prepare($config) {
method filter (line 11) | public function filter(&$uri, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/URIFilter/MakeAbsolute.php
class HTMLPurifier_URIFilter_MakeAbsolute (line 5) | class HTMLPurifier_URIFilter_MakeAbsolute extends HTMLPurifier_URIFilter
method prepare (line 10) | public function prepare($config) {
method filter (line 24) | public function filter(&$uri, $config, $context) {
method _collapseStack (line 78) | private function _collapseStack($stack) {
FILE: libraries/purifier/HTMLPurifier/URIFilter/Munge.php
class HTMLPurifier_URIFilter_Munge (line 3) | class HTMLPurifier_URIFilter_Munge extends HTMLPurifier_URIFilter
method prepare (line 11) | public function prepare($config) {
method filter (line 18) | public function filter(&$uri, $config, $context) {
method makeReplace (line 43) | protected function makeReplace($uri, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/URIParser.php
class HTMLPurifier_URIParser (line 7) | class HTMLPurifier_URIParser
method __construct (line 15) | public function __construct() {
method parse (line 25) | public function parse($uri) {
FILE: libraries/purifier/HTMLPurifier/URIScheme.php
class HTMLPurifier_URIScheme (line 6) | class HTMLPurifier_URIScheme
method validate (line 35) | public function validate(&$uri, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/URIScheme/ftp.php
class HTMLPurifier_URIScheme_ftp (line 6) | class HTMLPurifier_URIScheme_ftp extends HTMLPurifier_URIScheme {
method validate (line 12) | public function validate(&$uri, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/URIScheme/http.php
class HTMLPurifier_URIScheme_http (line 6) | class HTMLPurifier_URIScheme_http extends HTMLPurifier_URIScheme {
method validate (line 12) | public function validate(&$uri, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/URIScheme/https.php
class HTMLPurifier_URIScheme_https (line 6) | class HTMLPurifier_URIScheme_https extends HTMLPurifier_URIScheme_http {
FILE: libraries/purifier/HTMLPurifier/URIScheme/mailto.php
class HTMLPurifier_URIScheme_mailto (line 12) | class HTMLPurifier_URIScheme_mailto extends HTMLPurifier_URIScheme {
method validate (line 16) | public function validate(&$uri, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/URIScheme/news.php
class HTMLPurifier_URIScheme_news (line 6) | class HTMLPurifier_URIScheme_news extends HTMLPurifier_URIScheme {
method validate (line 10) | public function validate(&$uri, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/URIScheme/nntp.php
class HTMLPurifier_URIScheme_nntp (line 6) | class HTMLPurifier_URIScheme_nntp extends HTMLPurifier_URIScheme {
method validate (line 11) | public function validate(&$uri, $config, $context) {
FILE: libraries/purifier/HTMLPurifier/URISchemeRegistry.php
class HTMLPurifier_URISchemeRegistry (line 6) | class HTMLPurifier_URISchemeRegistry
method instance (line 16) | public static function instance($prototype = null) {
method getScheme (line 37) | public function getScheme($scheme, $config, $context) {
method register (line 62) | public function register($scheme, $scheme_obj) {
FILE: libraries/purifier/HTMLPurifier/UnitConverter.php
class HTMLPurifier_UnitConverter (line 7) | class HTMLPurifier_UnitConverter
method __construct (line 53) | public function __construct($output_precision = 4, $internal_precision...
method convert (line 77) | public function convert($length, $to_unit) {
method getSigFigs (line 173) | public function getSigFigs($n) {
method add (line 188) | private function add($s1, $s2, $scale) {
method mul (line 196) | private function mul($s1, $s2, $scale) {
method div (line 204) | private function div($s1, $s2, $scale) {
method round (line 213) | private function round($n, $sigfigs) {
method scale (line 236) | private function scale($r, $scale) {
FILE: libraries/purifier/HTMLPurifier/VarParser.php
class HTMLPurifier_VarParser (line 7) | class HTMLPurifier_VarParser
method parse (line 61) | final public function parse($var, $type, $allow_null = false) {
method parseImplementation (line 113) | protected function parseImplementation($var, $type, $allow_null) {
method error (line 120) | protected function error($msg) {
method errorInconsistent (line 130) | protected function errorInconsistent($class, $type) {
method errorGeneric (line 137) | protected function errorGeneric($var, $type) {
method getTypeName (line 142) | static public function getTypeName($type) {
FILE: libraries/purifier/HTMLPurifier/VarParser/Flexible.php
class HTMLPurifier_VarParser_Flexible (line 8) | class HTMLPurifier_VarParser_Flexible extends HTMLPurifier_VarParser
method parseImplementation (line 11) | protected function parseImplementation($var, $type, $allow_null) {
FILE: libraries/purifier/HTMLPurifier/VarParser/Native.php
class HTMLPurifier_VarParser_Native (line 8) | class HTMLPurifier_VarParser_Native extends HTMLPurifier_VarParser
method parseImplementation (line 11) | protected function parseImplementation($var, $type, $allow_null) {
method evalExpression (line 15) | protected function evalExpression($expr) {
FILE: libraries/purifier/HTMLPurifier/VarParserException.php
class HTMLPurifier_VarParserException (line 6) | class HTMLPurifier_VarParserException extends HTMLPurifier_Exception
FILE: libraries/score.php
function score (line 3) | function score($activity = 'none',$id = 0,$userid = 0) {
FILE: libraries/shared.php
function generateLink (line 3) | function generateLink($controller,$action) {
function noRender (line 7) | function noRender() {
function authenticate (line 12) | function authenticate($force = 0) {
function getLink (line 46) | function getLink() {
function sanitize (line 53) | function sanitize($input,$type = "old") {
function escape (line 95) | function escape($input) {
function createSlug (line 100) | function createSlug($input) {
function fetchURL (line 108) | function fetchURL($url) {
function db (line 132) | function db() {
function basePath (line 137) | function basePath() {
function basePathNS (line 141) | function basePathNS() {
function datify (line 145) | function datify($date) {
function datifyunix (line 149) | function datifyunix($date) {
function highlight (line 153) | function highlight($c,$q){
function excerpt (line 160) | function excerpt($text, $phrase, $radius = 100, $ending = "...") {
function truncate (line 199) | function truncate ($text, $length = 200, $ending = "...") {
FILE: libraries/template.class.php
class Template (line 2) | class Template {
method __construct (line 8) | function __construct($controller,$action) {
method set (line 15) | function set($name,$value) {
method overrideController (line 19) | function overrideController($controller) {
method overrideAction (line 23) | function overrideAction($action) {
method render (line 29) | function render($doNotRenderHeader = 0) {
FILE: libraries/timeago.php
function timeAgo (line 2) | function timeAgo($datefrom,$dateto=-1)
function TimeHours (line 160) | function TimeHours($datefrom,$dateto=-1)
Condensed preview — 387 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,323K chars).
[
{
"path": ".buildpath",
"chars": 169,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<buildpath>\n\t<buildpathentry kind=\"src\" path=\"\"/>\n\t<buildpathentry kind=\"con\" pat"
},
{
"path": ".htaccess",
"chars": 181,
"preview": "<IfModule mod_rewrite.c>\n RewriteEngine On\n RewriteCond %{REQUEST_FILENAME} !-d\n RewriteCond %{REQUEST_FILENAME"
},
{
"path": ".project",
"chars": 498,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>qwench_new</name>\n\t<comment></comment>\n\t<projects>\n\t<"
},
{
"path": ".settings/org.eclipse.php.core.prefs",
"chars": 87,
"preview": "#Sat Oct 19 18:13:01 WAT 2013\neclipse.preferences.version=1\ninclude_path=0;/qwench_new\n"
},
{
"path": "LICENSE.TXT",
"chars": 4032,
"preview": "Qwench\nCopyright (c) 2009-2010 Inscripts\n\nQwench ('the Software') is a copyrighted work of authorship. Inscripts \nretain"
},
{
"path": "README.TXT",
"chars": 305,
"preview": "Qwench\nCopyright (c) 2009-2010 Inscripts\n\nInstallation Instructions\n-----------------------------------------------\n\n1. "
},
{
"path": "TODO.TXT",
"chars": 151,
"preview": "1\tVisit the installation process, make more precise and show errors, rather than \t\tassume\n\teverything works fine\n\n2\tEdit"
},
{
"path": "VERSION.TXT",
"chars": 3,
"preview": "1.0"
},
{
"path": "config.default.php",
"chars": 1231,
"preview": "<?php\n\n// Database Details\ndefine('SERVERNAME','localhost');\ndefine('SERVERPORT','3306');\ndefine('DBUSERNAME','root'); "
},
{
"path": "controllers/answers.php",
"chars": 6374,
"preview": "<?php\n\nfunction edit() {\n\tauthenticate(1);\n\n\tglobal $path;\n\tglobal $template;\n \t$answerid = sanitize($path[2],\"int\");\n\n\t"
},
{
"path": "controllers/comments.php",
"chars": 2506,
"preview": "<?php\n\nfunction post() {\n\tif ($_SESSION['userid'] == '') {\n\t\techo \"0\";\n\t\texit;\n\t}\n\n\tglobal $template;\n\tglobal $noheader;"
},
{
"path": "controllers/helpers.php",
"chars": 270,
"preview": "<?php\n\nfunction getUser($id) {\n\tglobal $helper;\n\n\t$id = sanitize($id,\"int\");\n\t$sql = (\"select * from users where id = '\""
},
{
"path": "controllers/questions.php",
"chars": 26193,
"preview": "<?php\n\nfunction ask() {\n\tauthenticate(1);\n\n\tglobal $template;\n\t\n\t$basePath = basePath();\n\t$basePathNS = basePathNS();\n\n\t"
},
{
"path": "controllers/tags.php",
"chars": 610,
"preview": "<?php\n\nfunction index() {\n\tglobal $template;\n\n\t$sql = (\"select count(id) count from tags\");\n\t$query = mysql_query($sql);"
},
{
"path": "controllers/users.php",
"chars": 3237,
"preview": "<?php\n\nfunction login() {\n\tglobal $template;\n\t$template->set('loginpage','1');\n}\n\nfunction view() {\n\n\tglobal $path;\n\tglo"
},
{
"path": "css/main.css",
"chars": 11122,
"preview": "html, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, bi"
},
{
"path": "css/prettify.css",
"chars": 658,
"preview": "/* Pretty printing styles. Used with prettify.js. */\n\n.str { color: #080; }\n.kwd { color: #075c70; }\n.com { color: #800;"
},
{
"path": "css/tagscomplete.css",
"chars": 3442,
"preview": " \nul.holder { margin: 0; border: 1px solid #d1dbbd; overflow: hidden; height: auto !important; height: 1%; padding: 4px "
},
{
"path": "css/wmd.css",
"chars": 2859,
"preview": "\n.wmd-panel\n{\n \n}\n\n#wmd-editor\n{\n \n}\n\n#wmd-button-bar \n{\n\twidth: 100%;\n\tpadding-top: 5px;\n\tpadding-bottom: 5px;\n \n}\n\n#wm"
},
{
"path": "db/1.txt",
"chars": 6755,
"preview": "-- MySQL dump 10.11\n--\n-- Host: localhost Database: qwench\n-- ------------------------------------------------------\n"
},
{
"path": "db/2.txt",
"chars": 448,
"preview": "ALTER TABLE `users` ADD COLUMN `name` VARCHAR(255) NOT NULL AFTER `password`,\n ADD COLUMN `email` VARCHAR(255) NOT NULL "
},
{
"path": "db/3.txt",
"chars": 842,
"preview": "CREATE TABLE `activities` (\n `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,\n `userid` INTEGER UNSIGNED NOT NULL,\n `ac"
},
{
"path": "index.php",
"chars": 1506,
"preview": "<?php\n\n/* Start Session */\n\nsession_name(\"qwench\");\nsession_start();\n\n/* Define */\n\ndefine('ROOT',DIRNAME(__FILE__));\nde"
},
{
"path": "install.php",
"chars": 7262,
"preview": "<?php\n\ninclude (dirname(__FILE__)).\"/config.php\";\n\nfunction db() {\n\t$dbh = mysql_connect(SERVERNAME.':'.SERVERPORT,DBUSE"
},
{
"path": "js/fancyalert.js",
"chars": 1791,
"preview": "/*\n\njQuery Fancy Alert\nCopyright (c) 2009 Anant Garg (http://anantgarg.com)\n\nVersion: 1.0\n\nPermission is hereby granted,"
},
{
"path": "js/jquery.js",
"chars": 57254,
"preview": "/*\n * jQuery JavaScript Library v1.3.2\n * http://jquery.com/\n *\n * Copyright (c) 2009 John Resig\n * Dual licensed under "
},
{
"path": "js/prettify/lang-css.js",
"chars": 932,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[ \\t\\r\\n\\f]+/,null,\" \\t\\r\\n\\u000c\"]],[[\"str\",/^\\\"(?:[^\\n\\r\\f\\\\\\\"]|"
},
{
"path": "js/prettify/lang-hs.js",
"chars": 633,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\x0B\\x0C\\r ]+/,null,\"\\t\\n\\u000b\\u000c\\r \"],[\"str\",/^\\\"(?:[^\\\""
},
{
"path": "js/prettify/lang-lisp.js",
"chars": 788,
"preview": "(function(){var a=null;\nPR.registerLangHandler(PR.createSimpleLexer([[\"opn\",/^\\(/,a,\"(\"],[\"clo\",/^\\)/,a,\")\"],[\"com\",/^;["
},
{
"path": "js/prettify/lang-lua.js",
"chars": 570,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xA0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"str\",/^(?:\\\"(?:[^\\\"\\\\]|\\\\["
},
{
"path": "js/prettify/lang-ml.js",
"chars": 1119,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xA0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"com\",/^#(?:if[\\t\\n\\r \\xA0]"
},
{
"path": "js/prettify/lang-proto.js",
"chars": 332,
"preview": "PR.registerLangHandler(PR.sourceDecorator({keywords:\"bool bytes default double enum extend extensions false fixed32 fixe"
},
{
"path": "js/prettify/lang-sql.js",
"chars": 1654,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xA0]+/,null,\"\\t\\n\\r \\u00a0\"],[\"str\",/^(?:\"(?:[^\\\"\\\\]|\\\\.)"
},
{
"path": "js/prettify/lang-vb.js",
"chars": 1789,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xA0\\u2028\\u2029]+/,null,\"\\t\\n\\r \\u00a0\\u2028\\u2029\"],[\"st"
},
{
"path": "js/prettify/lang-wiki.js",
"chars": 567,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t \\xA0a-gi-z0-9]+/,null,\"\\t \\u00a0abcdefgijklmnopqrstuvwxyz01234"
},
{
"path": "js/prettify/prettify.js",
"chars": 18805,
"preview": "(function(){\nvar o=true,r=null,z=false;window.PR_SHOULD_USE_CONTINUATION=o;window.PR_TAB_WIDTH=8;window.PR_normalizedHtm"
},
{
"path": "js/showdown.js",
"chars": 34158,
"preview": "//\n// showdown.js -- A javascript port of Markdown.\n//\n// Copyright (c) 2007 John Fraser.\n//\n// Original Markdown Copyri"
},
{
"path": "js/tagscomplete.js",
"chars": 22235,
"preview": "/*\n FCBKcomplete 2.6\n - Jquery version required: 1.2.x, 1.3.x\n \n Changelog:\n \n - 2.00\tnew version of fcbkcomplete\n \n - 2"
},
{
"path": "js/wmd.js",
"chars": 64308,
"preview": "var Attacklab = Attacklab || {};\n\nAttacklab.wmdBase = function(){\n\n\t// A few handy aliases for readability.\n\tvar wmd = "
},
{
"path": "libraries/helper.class.php",
"chars": 794,
"preview": "<?php\nclass Helper {\n\t\n\tprotected $variables = array();\n\tprotected $_action;\n\t\n\t/** Set Variables **/\n\n\n\n\tfunction set($"
},
{
"path": "libraries/markdown.php",
"chars": 48368,
"preview": "<?php\n#\n# Markdown - A text-to-HTML conversion tool for web writers\n#\n# PHP Markdown\n# Copyright (c) 2004-2008 Michel "
},
{
"path": "libraries/pagination.class.php",
"chars": 3387,
"preview": "<?php\n\n/* http://code.google.com/p/spaceshipcollaborative/wiki/PHPagination */\n\nclass Pagination{\n var $output = ''; "
},
{
"path": "libraries/purifier/HTMLPurifier/AttrCollections.php",
"chars": 4385,
"preview": "<?php\n\n/**\n * Defines common attribute collections that modules reference\n */\n\nclass HTMLPurifier_AttrCollections\n{\n\n "
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/AlphaValue.php",
"chars": 562,
"preview": "<?php\n\nclass HTMLPurifier_AttrDef_CSS_AlphaValue extends HTMLPurifier_AttrDef_CSS_Number\n{\n\n public function __constr"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/Background.php",
"chars": 2722,
"preview": "<?php\n\n/**\n * Validates shorthand CSS property background.\n * @warning Does not support url tokens that have internal sp"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php",
"chars": 3439,
"preview": "<?php\n\n/* W3C says:\n [ // adjective and number must be in correct order, even if\n // you could switch them witho"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/Border.php",
"chars": 1292,
"preview": "<?php\n\n/**\n * Validates the border property as defined by CSS.\n */\nclass HTMLPurifier_AttrDef_CSS_Border extends HTMLPur"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/Color.php",
"chars": 2570,
"preview": "<?php\n\n/**\n * Validates Color as defined by CSS.\n */\nclass HTMLPurifier_AttrDef_CSS_Color extends HTMLPurifier_AttrDef\n{"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/Composite.php",
"chars": 1096,
"preview": "<?php\n\n/**\n * Allows multiple validators to attempt to validate attribute.\n *\n * Composite is just what it sounds like: "
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php",
"chars": 775,
"preview": "<?php\n\n/**\n * Decorator which enables CSS properties to be disabled for specific elements.\n */\nclass HTMLPurifier_AttrDe"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/Filter.php",
"chars": 1904,
"preview": "<?php\n\n/**\n * Microsoft's proprietary filter: CSS property\n * @note Currently supports the alpha filter. In the future, "
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/Font.php",
"chars": 5938,
"preview": "<?php\n\n/**\n * Validates shorthand CSS property font.\n */\nclass HTMLPurifier_AttrDef_CSS_Font extends HTMLPurifier_AttrDe"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/FontFamily.php",
"chars": 3224,
"preview": "<?php\n\n/**\n * Validates a font family list according to CSS spec\n * @todo whitelisting allowed fonts would be nice\n */\nc"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php",
"chars": 1301,
"preview": "<?php\n\n/**\n * Decorator which enables !important to be used in CSS values.\n */\nclass HTMLPurifier_AttrDef_CSS_ImportantD"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/Length.php",
"chars": 1368,
"preview": "<?php\n\n/**\n * Represents a Length as defined by CSS.\n */\nclass HTMLPurifier_AttrDef_CSS_Length extends HTMLPurifier_Attr"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/ListStyle.php",
"chars": 2263,
"preview": "<?php\n\n/**\n * Validates shorthand CSS property list-style.\n * @warning Does not support url tokens that have internal sp"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/Multiple.php",
"chars": 1772,
"preview": "<?php\n\n/**\n * Framework class for strings that involve multiple values.\n *\n * Certain CSS properties such as border-widt"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/Number.php",
"chars": 1797,
"preview": "<?php\n\n/**\n * Validates a number as defined by the CSS spec.\n */\nclass HTMLPurifier_AttrDef_CSS_Number extends HTMLPurif"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/Percentage.php",
"chars": 1003,
"preview": "<?php\n\n/**\n * Validates a Percentage as defined by the CSS spec.\n */\nclass HTMLPurifier_AttrDef_CSS_Percentage extends H"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/TextDecoration.php",
"chars": 949,
"preview": "<?php\n\n/**\n * Validates the value for the CSS property text-decoration\n * @note This class could be generalized into a v"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS/URI.php",
"chars": 1971,
"preview": "<?php\n\n/**\n * Validates a URI in CSS syntax, which uses url('http://example.com')\n * @note While theoretically speaking "
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/CSS.php",
"chars": 3082,
"preview": "<?php\n\n/**\n * Validates the HTML attribute style, otherwise known as CSS.\n * @note We don't implement the whole CSS spec"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/Enum.php",
"chars": 1996,
"preview": "<?php\n\n// Enum = Enumerated\n/**\n * Validates a keyword against a list of valid values.\n * @warning The case-insensitive "
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/HTML/Bool.php",
"chars": 560,
"preview": "<?php\n\n/**\n * Validates a boolean attribute\n */\nclass HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef\n{\n\n "
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/HTML/Class.php",
"chars": 1184,
"preview": "<?php\n\n/**\n * Implements special behavior for class attribute (normally NMTOKENS)\n */\nclass HTMLPurifier_AttrDef_HTML_Cl"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/HTML/Color.php",
"chars": 807,
"preview": "<?php\n\n/**\n * Validates a color according to the HTML spec.\n */\nclass HTMLPurifier_AttrDef_HTML_Color extends HTMLPurifi"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/HTML/FrameTarget.php",
"chars": 570,
"preview": "<?php\n\n/**\n * Special-case enum attribute definition that lazy loads allowed frame targets\n */\nclass HTMLPurifier_AttrDe"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/HTML/ID.php",
"chars": 2241,
"preview": "<?php\n\n/**\n * Validates the HTML attribute ID.\n * @warning Even though this is the id processor, it\n * will ign"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/HTML/Length.php",
"chars": 950,
"preview": "<?php\n\n/**\n * Validates the HTML type length (not to be confused with CSS's length).\n *\n * This accepts integer pixels o"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/HTML/LinkTypes.php",
"chars": 1404,
"preview": "<?php\n\n/**\n * Validates a rel/rev link attribute against a directive of allowed values\n * @note We cannot use Enum becau"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/HTML/MultiLength.php",
"chars": 984,
"preview": "<?php\n\n/**\n * Validates a MultiLength as defined by the HTML spec.\n *\n * A multilength is either a integer (pixel count)"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/HTML/Nmtokens.php",
"chars": 1671,
"preview": "<?php\n\n/**\n * Validates contents based on NMTOKENS attribute type.\n */\nclass HTMLPurifier_AttrDef_HTML_Nmtokens extends "
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/HTML/Pixels.php",
"chars": 1250,
"preview": "<?php\n\n/**\n * Validates an integer representation of pixels according to the HTML spec.\n */\nclass HTMLPurifier_AttrDef_H"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/Integer.php",
"chars": 2247,
"preview": "<?php\n\n/**\n * Validates an integer.\n * @note While this class was modeled off the CSS definition, no currently\n * "
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/Lang.php",
"chars": 2164,
"preview": "<?php\n\n/**\n * Validates the HTML attribute lang, effectively a language code.\n * @note Built according to RFC 3066, whic"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/Switch.php",
"chars": 972,
"preview": "<?php\n\n/**\n * Decorator that, depending on a token, switches between two definitions.\n */\nclass HTMLPurifier_AttrDef_Swi"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/Text.php",
"chars": 269,
"preview": "<?php\n\n/**\n * Validates arbitrary text according to the HTML spec.\n */\nclass HTMLPurifier_AttrDef_Text extends HTMLPurif"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php",
"chars": 639,
"preview": "<?php\n\n/**\n * Primitive email validation class based on the regexp found at\n * http://www.regular-expressions.info/email"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/URI/Email.php",
"chars": 282,
"preview": "<?php\n\nabstract class HTMLPurifier_AttrDef_URI_Email extends HTMLPurifier_AttrDef\n{\n\n /**\n * Unpacks a mailbox in"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/URI/Host.php",
"chars": 2025,
"preview": "<?php\n\n/**\n * Validates a host according to the IPv4, IPv6 and DNS (future) specifications.\n */\nclass HTMLPurifier_AttrD"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/URI/IPv4.php",
"chars": 806,
"preview": "<?php\n\n/**\n * Validates an IPv4 address\n * @author Feyd @ forums.devnetwork.net (public domain)\n */\nclass HTMLPurifier_A"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/URI/IPv6.php",
"chars": 2600,
"preview": "<?php\n\n/**\n * Validates an IPv6 address.\n * @author Feyd @ forums.devnetwork.net (public domain)\n * @note This function "
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef/URI.php",
"chars": 2108,
"preview": "<?php\n\n/**\n * Validates a URI as defined by RFC 3986.\n * @note Scheme-specific mechanics deferred to HTMLPurifier_URISch"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrDef.php",
"chars": 3246,
"preview": "<?php\n\n/**\n * Base class for all validating attribute definitions.\n *\n * This family of classes forms the core for not o"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/Background.php",
"chars": 524,
"preview": "<?php\n\n/**\n * Pre-transform that changes proprietary background attribute to CSS.\n */\nclass HTMLPurifier_AttrTransform_B"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/BdoDir.php",
"chars": 463,
"preview": "<?php\n\n// this MUST be placed in post, as it assumes that any value in dir is valid\n\n/**\n * Post-trasnform that ensures "
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/BgColor.php",
"chars": 500,
"preview": "<?php\n\n/**\n * Pre-transform that changes deprecated bgcolor attribute to CSS.\n */\nclass HTMLPurifier_AttrTransform_BgCol"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/BoolToCSS.php",
"chars": 867,
"preview": "<?php\n\n/**\n * Pre-transform that changes converts a boolean attribute to fixed CSS\n */\nclass HTMLPurifier_AttrTransform_"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/Border.php",
"chars": 501,
"preview": "<?php\n\n/**\n * Pre-transform that changes deprecated border attribute to CSS.\n */\nclass HTMLPurifier_AttrTransform_Border"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/EnumToCSS.php",
"chars": 1462,
"preview": "<?php\n\n/**\n * Generic pre-transform that converts an attribute with a fixed number of\n * values (enumerated) to CSS.\n */"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/ImgRequired.php",
"chars": 1150,
"preview": "<?php\n\n// must be called POST validation\n\n/**\n * Transform that supplies default values for the src and alt attributes\n "
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/ImgSpace.php",
"chars": 1084,
"preview": "<?php\n\n/**\n * Pre-transform that changes deprecated hspace and vspace attributes to CSS\n */\nclass HTMLPurifier_AttrTrans"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/Input.php",
"chars": 1291,
"preview": "<?php\n\n/**\n * Performs miscellaneous cross attribute validation and filtering for\n * input elements. This is meant to be"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/Lang.php",
"chars": 711,
"preview": "<?php\n\n/**\n * Post-transform that copies lang's value to xml:lang (and vice-versa)\n * @note Theoretically speaking, this"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/Length.php",
"chars": 706,
"preview": "<?php\n\n/**\n * Class for handling width/height length attribute transformations to CSS\n */\nclass HTMLPurifier_AttrTransfo"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/Name.php",
"chars": 587,
"preview": "<?php\n\n/**\n * Pre-transform that changes deprecated name attribute to ID if necessary\n */\nclass HTMLPurifier_AttrTransfo"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/NameSync.php",
"chars": 798,
"preview": "<?php\n\n/**\n * Post-transform that performs validation to the name attribute; if\n * it is present with an equivalent id a"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/SafeEmbed.php",
"chars": 381,
"preview": "<?php\n\nclass HTMLPurifier_AttrTransform_SafeEmbed extends HTMLPurifier_AttrTransform\n{\n public $name = \"SafeEmbed\";\n\n"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/SafeObject.php",
"chars": 389,
"preview": "<?php\n\n/**\n * Writes default type for all objects. Currently only supports flash.\n */\nclass HTMLPurifier_AttrTransform_S"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/SafeParam.php",
"chars": 1583,
"preview": "<?php\n\n/**\n * Validates name/value pairs in param tags to be used in safe objects. This\n * will only allow name values i"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/ScriptRequired.php",
"chars": 363,
"preview": "<?php\n\n/**\n * Implements required attribute stipulation for <script>\n */\nclass HTMLPurifier_AttrTransform_ScriptRequired"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform/Textarea.php",
"chars": 400,
"preview": "<?php\n\n/**\n * Sets height/width defaults for <textarea>\n */\nclass HTMLPurifier_AttrTransform_Textarea extends HTMLPurifi"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTransform.php",
"chars": 1858,
"preview": "<?php\n\n/**\n * Processes an entire attribute array for corrections needing multiple values.\n *\n * Occasionally, a certain"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrTypes.php",
"chars": 2757,
"preview": "<?php\n\n/**\n * Provides lookup array of attribute types to HTMLPurifier_AttrDef objects\n */\nclass HTMLPurifier_AttrTypes\n"
},
{
"path": "libraries/purifier/HTMLPurifier/AttrValidator.php",
"chars": 6415,
"preview": "<?php\n\n/**\n * Validates the attributes of a token. Doesn't manage required attributes\n * very well. The only reason we f"
},
{
"path": "libraries/purifier/HTMLPurifier/Bootstrap.php",
"chars": 3606,
"preview": "<?php\n\n// constants are slow, so we use as few as possible\nif (!defined('HTMLPURIFIER_PREFIX')) {\n define('HTMLPURIFI"
},
{
"path": "libraries/purifier/HTMLPurifier/CSSDefinition.php",
"chars": 12182,
"preview": "<?php\n\n/**\n * Defines allowed CSS attributes and what their values are.\n * @see HTMLPurifier_HTMLDefinition\n */\nclass HT"
},
{
"path": "libraries/purifier/HTMLPurifier/ChildDef/Chameleon.php",
"chars": 1529,
"preview": "<?php\n\n/**\n * Definition that uses different definitions depending on context.\n *\n * The del and ins tags are notable be"
},
{
"path": "libraries/purifier/HTMLPurifier/ChildDef/Custom.php",
"chars": 2741,
"preview": "<?php\n\n/**\n * Custom validation class, accepts DTD child definitions\n *\n * @warning Currently this class is an all or no"
},
{
"path": "libraries/purifier/HTMLPurifier/ChildDef/Empty.php",
"chars": 623,
"preview": "<?php\n\n/**\n * Definition that disallows all elements.\n * @warning validateChildren() in this class is actually never cal"
},
{
"path": "libraries/purifier/HTMLPurifier/ChildDef/Optional.php",
"chars": 958,
"preview": "<?php\n\n/**\n * Definition that allows a set of elements, and allows no children.\n * @note This is a hack to reuse code fr"
},
{
"path": "libraries/purifier/HTMLPurifier/ChildDef/Required.php",
"chars": 3862,
"preview": "<?php\n\n/**\n * Definition that allows a set of elements, but disallows empty children.\n */\nclass HTMLPurifier_ChildDef_Re"
},
{
"path": "libraries/purifier/HTMLPurifier/ChildDef/StrictBlockquote.php",
"chars": 3161,
"preview": "<?php\n\n/**\n * Takes the contents of blockquote when in strict and reformats for validation.\n */\nclass HTMLPurifier_Child"
},
{
"path": "libraries/purifier/HTMLPurifier/ChildDef/Table.php",
"chars": 5538,
"preview": "<?php\n\n/**\n * Definition for tables\n */\nclass HTMLPurifier_ChildDef_Table extends HTMLPurifier_ChildDef\n{\n public $al"
},
{
"path": "libraries/purifier/HTMLPurifier/ChildDef.php",
"chars": 1408,
"preview": "<?php\n\n/**\n * Defines allowed child nodes and validates tokens against it.\n */\nabstract class HTMLPurifier_ChildDef\n{\n "
},
{
"path": "libraries/purifier/HTMLPurifier/Config.php",
"chars": 20810,
"preview": "<?php\n\n/**\n * Configuration object that triggers customizable behavior.\n *\n * @warning This class is strongly defined: t"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php",
"chars": 1152,
"preview": "<?php\n\n/**\n * Converts HTMLPurifier_ConfigSchema_Interchange to our runtime\n * representation used to perform checks on "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/Builder/Xml.php",
"chars": 3862,
"preview": "<?php\n\n/**\n * Converts HTMLPurifier_ConfigSchema_Interchange to an XML format,\n * which can be further processed to gene"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/Exception.php",
"chars": 162,
"preview": "<?php\n\n/**\n * Exceptions related to configuration schema\n */\nclass HTMLPurifier_ConfigSchema_Exception extends HTMLPurif"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/Interchange/Directive.php",
"chars": 1754,
"preview": "<?php\n\n/**\n * Interchange component class describing configuration directives.\n */\nclass HTMLPurifier_ConfigSchema_Inter"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/Interchange/Id.php",
"chars": 781,
"preview": "<?php\n\n/**\n * Represents a directive ID in the interchange format.\n */\nclass HTMLPurifier_ConfigSchema_Interchange_Id\n{\n"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/Interchange.php",
"chars": 1068,
"preview": "<?php\n\n/**\n * Generic schema interchange format that can be converted to a runtime\n * representation (HTMLPurifier_Confi"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/InterchangeBuilder.php",
"chars": 6055,
"preview": "<?php\n\nclass HTMLPurifier_ConfigSchema_InterchangeBuilder\n{\n\n /**\n * Used for processing DEFAULT, nothing else.\n "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/Validator.php",
"chars": 7522,
"preview": "<?php\n\n/**\n * Performs validations on HTMLPurifier_ConfigSchema_Interchange\n *\n * @note If you see '// handled by Interc"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/ValidatorAtom.php",
"chars": 1884,
"preview": "<?php\n\n/**\n * Fluent interface for validating the contents of member variables.\n * This should be immutable. See HTMLPur"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt",
"chars": 222,
"preview": "Attr.AllowedClasses\nTYPE: lookup/null\nVERSION: 4.0.0\nDEFAULT: null\n--DESCRIPTION--\nList of allowed class values in the c"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt",
"chars": 578,
"preview": "Attr.AllowedFrameTargets\nTYPE: lookup\nDEFAULT: array()\n--DESCRIPTION--\nLookup table of all allowed link frame targets. "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt",
"chars": 288,
"preview": "Attr.AllowedRel\nTYPE: lookup\nVERSION: 1.6.0\nDEFAULT: array()\n--DESCRIPTION--\nList of allowed forward document relationsh"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt",
"chars": 255,
"preview": "Attr.AllowedRev\nTYPE: lookup\nVERSION: 1.6.0\nDEFAULT: array()\n--DESCRIPTION--\nList of allowed reverse document relationsh"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt",
"chars": 926,
"preview": "Attr.ClassUseCDATA\nTYPE: bool/null\nDEFAULT: null\nVERSION: 4.0.0\n--DESCRIPTION--\nIf null, class will auto-detect the doct"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt",
"chars": 479,
"preview": "Attr.DefaultImageAlt\nTYPE: string/null\nDEFAULT: null\nVERSION: 3.2.0\n--DESCRIPTION--\nThis is the content of the alt tag o"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt",
"chars": 320,
"preview": "Attr.DefaultInvalidImage\nTYPE: string\nDEFAULT: ''\n--DESCRIPTION--\nThis is the default image an img tag will be pointed t"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt",
"chars": 301,
"preview": "Attr.DefaultInvalidImageAlt\nTYPE: string\nDEFAULT: 'Invalid image'\n--DESCRIPTION--\nThis is the content of the alt tag of "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt",
"chars": 294,
"preview": "Attr.DefaultTextDir\nTYPE: string\nDEFAULT: 'ltr'\n--DESCRIPTION--\nDefines the default text direction (ltr or rtl) of the d"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt",
"chars": 645,
"preview": "Attr.EnableID\nTYPE: bool\nDEFAULT: false\nVERSION: 1.2.0\n--DESCRIPTION--\nAllows the ID attribute in HTML. This is disable"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt",
"chars": 262,
"preview": "Attr.ForbiddenClasses\nTYPE: lookup\nVERSION: 4.0.0\nDEFAULT: array()\n--DESCRIPTION--\nList of forbidden class values in the"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt",
"chars": 123,
"preview": "Attr.IDBlacklist\nTYPE: list\nDEFAULT: array()\nDESCRIPTION: Array of IDs not allowed in the document.\n--# vim: et sw=4 sts"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt",
"chars": 317,
"preview": "Attr.IDBlacklistRegexp\nTYPE: string/null\nVERSION: 1.6.0\nDEFAULT: NULL\n--DESCRIPTION--\nPCRE regular expression to be matc"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt",
"chars": 475,
"preview": "Attr.IDPrefix\nTYPE: string\nVERSION: 1.2.0\nDEFAULT: ''\n--DESCRIPTION--\nString to prefix to IDs. If you have no idea what"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt",
"chars": 660,
"preview": "Attr.IDPrefixLocal\nTYPE: string\nVERSION: 1.2.0\nDEFAULT: ''\n--DESCRIPTION--\nTemporary prefix for IDs used in conjunction "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt",
"chars": 1138,
"preview": "AutoFormat.AutoParagraph\nTYPE: bool\nVERSION: 2.0.1\nDEFAULT: false\n--DESCRIPTION--\n\n<p>\n This directive turns on auto-pa"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt",
"chars": 301,
"preview": "AutoFormat.Custom\nTYPE: list\nVERSION: 2.0.1\nDEFAULT: array()\n--DESCRIPTION--\n\n<p>\n This directive can be used to add cu"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt",
"chars": 317,
"preview": "AutoFormat.DisplayLinkURI\nTYPE: bool\nVERSION: 3.2.0\nDEFAULT: false\n--DESCRIPTION--\n<p>\n This directive turns on the in-"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt",
"chars": 267,
"preview": "AutoFormat.Linkify\nTYPE: bool\nVERSION: 2.0.1\nDEFAULT: false\n--DESCRIPTION--\n\n<p>\n This directive turns on linkification"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt",
"chars": 326,
"preview": "AutoFormat.PurifierLinkify.DocURL\nTYPE: string\nVERSION: 2.0.1\nDEFAULT: '#%s'\nALIASES: AutoFormatParam.PurifierLinkifyDoc"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt",
"chars": 308,
"preview": "AutoFormat.PurifierLinkify\nTYPE: bool\nVERSION: 2.0.1\nDEFAULT: false\n--DESCRIPTION--\n\n<p>\n Internal auto-formatter that "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt",
"chars": 364,
"preview": "AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions\nTYPE: lookup\nVERSION: 4.0.0\nDEFAULT: array('td' => true, 'th' => true)\n--DE"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt",
"chars": 449,
"preview": "AutoFormat.RemoveEmpty.RemoveNbsp\nTYPE: bool\nVERSION: 4.0.0\nDEFAULT: false\n--DESCRIPTION--\n<p>\n When enabled, HTML Puri"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt",
"chars": 1774,
"preview": "AutoFormat.RemoveEmpty\nTYPE: bool\nVERSION: 3.2.0\nDEFAULT: false\n--DESCRIPTION--\n<p>\n When enabled, HTML Purifier will a"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt",
"chars": 236,
"preview": "CSS.AllowImportant\nTYPE: bool\nDEFAULT: false\nVERSION: 3.1.0\n--DESCRIPTION--\nThis parameter determines whether or not !im"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt",
"chars": 461,
"preview": "CSS.AllowTricky\nTYPE: bool\nDEFAULT: false\nVERSION: 3.1.0\n--DESCRIPTION--\nThis parameter determines whether or not to all"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt",
"chars": 608,
"preview": "CSS.AllowedProperties\nTYPE: lookup/null\nVERSION: 3.1.0\nDEFAULT: NULL\n--DESCRIPTION--\n\n<p>\n If HTML Purifier's style a"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt",
"chars": 196,
"preview": "CSS.DefinitionRev\nTYPE: int\nVERSION: 2.0.0\nDEFAULT: 1\n--DESCRIPTION--\n\n<p>\n Revision identifier for your custom defin"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt",
"chars": 623,
"preview": "CSS.MaxImgLength\nTYPE: string/null\nDEFAULT: '1200px'\nVERSION: 3.1.1\n--DESCRIPTION--\n<p>\n This parameter sets the maximum"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt",
"chars": 164,
"preview": "CSS.Proprietary\nTYPE: bool\nVERSION: 3.0.0\nDEFAULT: false\n--DESCRIPTION--\n\n<p>\n Whether or not to allow safe, propriet"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt",
"chars": 374,
"preview": "Cache.DefinitionImpl\nTYPE: string/null\nVERSION: 2.0.0\nDEFAULT: 'Serializer'\n--DESCRIPTION--\n\nThis directive defines whic"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt",
"chars": 330,
"preview": "Cache.SerializerPath\nTYPE: string/null\nVERSION: 2.0.0\nDEFAULT: NULL\n--DESCRIPTION--\n\n<p>\n Absolute path with no trail"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt",
"chars": 662,
"preview": "Core.AggressivelyFixLt\nTYPE: bool\nVERSION: 2.1.0\nDEFAULT: true\n--DESCRIPTION--\n<p>\n This directive enables aggressive"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt",
"chars": 433,
"preview": "Core.CollectErrors\nTYPE: bool\nVERSION: 2.0.0\nDEFAULT: false\n--DESCRIPTION--\n\nWhether or not to collect errors found whil"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt",
"chars": 650,
"preview": "Core.ColorKeywords\nTYPE: hash\nVERSION: 2.0.0\n--DEFAULT--\narray (\n 'maroon' => '#800000',\n 'red' => '#FF0000',\n 'orang"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt",
"chars": 433,
"preview": "Core.ConvertDocumentToFragment\nTYPE: bool\nDEFAULT: true\n--DESCRIPTION--\n\nThis parameter determines whether or not the fi"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt",
"chars": 632,
"preview": "Core.DirectLexLineNumberSyncInterval\nTYPE: int\nVERSION: 2.0.0\nDEFAULT: 0\n--DESCRIPTION--\n\n<p>\n Specifies the number of "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt",
"chars": 767,
"preview": "Core.Encoding\nTYPE: istring\nDEFAULT: 'utf-8'\n--DESCRIPTION--\nIf for some reason you are unable to convert all webpages t"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt",
"chars": 396,
"preview": "Core.EscapeInvalidChildren\nTYPE: bool\nDEFAULT: false\n--DESCRIPTION--\nWhen true, a child is found that is not allowed in "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt",
"chars": 202,
"preview": "Core.EscapeInvalidTags\nTYPE: bool\nDEFAULT: false\n--DESCRIPTION--\nWhen true, invalid tags will be written back to the doc"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt",
"chars": 567,
"preview": "Core.EscapeNonASCIICharacters\nTYPE: bool\nVERSION: 1.4.0\nDEFAULT: false\n--DESCRIPTION--\nThis directive overcomes a defici"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt",
"chars": 575,
"preview": "Core.HiddenElements\nTYPE: lookup\n--DEFAULT--\narray (\n 'script' => true,\n 'style' => true,\n)\n--DESCRIPTION--\n\n<p>\n Thi"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.Language.txt",
"chars": 292,
"preview": "Core.Language\nTYPE: string\nVERSION: 2.0.0\nDEFAULT: 'en'\n--DESCRIPTION--\n\nISO 639 language code for localizable things in"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt",
"chars": 1044,
"preview": "Core.LexerImpl\nTYPE: mixed/null\nVERSION: 2.0.0\nDEFAULT: NULL\n--DESCRIPTION--\n\n<p>\n This parameter determines what lexer"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt",
"chars": 556,
"preview": "Core.MaintainLineNumbers\nTYPE: bool/null\nVERSION: 2.0.0\nDEFAULT: NULL\n--DESCRIPTION--\n\n<p>\n If true, HTML Purifier will"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt",
"chars": 334,
"preview": "Core.RemoveInvalidImg\nTYPE: bool\nDEFAULT: true\nVERSION: 1.3.0\n--DESCRIPTION--\n\n<p>\n This directive enables pre-emptive "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt",
"chars": 280,
"preview": "Core.RemoveScriptContents\nTYPE: bool/null\nDEFAULT: NULL\nVERSION: 2.0.0\nDEPRECATED-VERSION: 2.1.0\nDEPRECATED-USE: Core.Hi"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt",
"chars": 307,
"preview": "Filter.Custom\nTYPE: list\nVERSION: 3.1.0\nDEFAULT: array()\n--DESCRIPTION--\n<p>\n This directive can be used to add custom "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt",
"chars": 485,
"preview": "Filter.ExtractStyleBlocks.Escaping\nTYPE: bool\nVERSION: 3.0.0\nDEFAULT: true\nALIASES: Filter.ExtractStyleBlocksEscaping, F"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt",
"chars": 1200,
"preview": "Filter.ExtractStyleBlocks.Scope\nTYPE: string/null\nVERSION: 3.0.0\nDEFAULT: NULL\nALIASES: Filter.ExtractStyleBlocksScope, "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt",
"chars": 576,
"preview": "Filter.ExtractStyleBlocks.TidyImpl\nTYPE: mixed/null\nVERSION: 3.1.0\nDEFAULT: NULL\nALIASES: FilterParam.ExtractStyleBlocks"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt",
"chars": 2758,
"preview": "Filter.ExtractStyleBlocks\nTYPE: bool\nVERSION: 3.1.0\nDEFAULT: false\nEXTERNAL: CSSTidy\n--DESCRIPTION--\n<p>\n This directiv"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt",
"chars": 326,
"preview": "Filter.YouTube\nTYPE: bool\nVERSION: 3.1.0\nDEFAULT: false\n--DESCRIPTION--\n<p>\n This directive enables YouTube video embed"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt",
"chars": 810,
"preview": "HTML.Allowed\nTYPE: itext/null\nVERSION: 2.0.0\nDEFAULT: NULL\n--DESCRIPTION--\n\n<p>\n This is a convenience directive that"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt",
"chars": 607,
"preview": "HTML.AllowedAttributes\nTYPE: lookup/null\nVERSION: 1.3.0\nDEFAULT: NULL\n--DESCRIPTION--\n\n<p>\n If HTML Purifier's attrib"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt",
"chars": 696,
"preview": "HTML.AllowedElements\nTYPE: lookup/null\nVERSION: 1.3.0\nDEFAULT: NULL\n--DESCRIPTION--\n<p>\n If HTML Purifier's tag set i"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt",
"chars": 726,
"preview": "HTML.AllowedModules\nTYPE: lookup/null\nVERSION: 2.0.0\nDEFAULT: NULL\n--DESCRIPTION--\n\n<p>\n A doctype comes with a set o"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt",
"chars": 471,
"preview": "HTML.Attr.Name.UseCDATA\nTYPE: bool\nDEFAULT: false\nVERSION: 4.0.0\n--DESCRIPTION--\nThe W3C specification DTD defines the n"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt",
"chars": 571,
"preview": "HTML.BlockWrapper\nTYPE: string\nVERSION: 1.3.0\nDEFAULT: 'p'\n--DESCRIPTION--\n\n<p>\n String name of element to wrap inlin"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt",
"chars": 622,
"preview": "HTML.CoreModules\nTYPE: lookup\nVERSION: 2.0.0\n--DEFAULT--\narray (\n 'Structure' => true,\n 'Text' => true,\n 'Hypertext' "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt",
"chars": 233,
"preview": "HTML.CustomDoctype\nTYPE: string/null\nVERSION: 2.0.1\nDEFAULT: NULL\n--DESCRIPTION--\n\nA custom doctype for power-users who "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt",
"chars": 1210,
"preview": "HTML.DefinitionID\nTYPE: string/null\nDEFAULT: NULL\nVERSION: 2.0.0\n--DESCRIPTION--\n\n<p>\n Unique identifier for a custom"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt",
"chars": 533,
"preview": "HTML.DefinitionRev\nTYPE: int\nVERSION: 2.0.0\nDEFAULT: 1\n--DESCRIPTION--\n\n<p>\n Revision identifier for your custom defi"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt",
"chars": 473,
"preview": "HTML.Doctype\nTYPE: string/null\nDEFAULT: NULL\n--DESCRIPTION--\nDoctype to use during filtering. Technically speaking this "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt",
"chars": 852,
"preview": "HTML.ForbiddenAttributes\nTYPE: lookup\nVERSION: 3.1.0\nDEFAULT: array()\n--DESCRIPTION--\n<p>\n While this directive is si"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt",
"chars": 754,
"preview": "HTML.ForbiddenElements\nTYPE: lookup\nVERSION: 3.1.0\nDEFAULT: array()\n--DESCRIPTION--\n<p>\n This was, perhaps, the most "
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt",
"chars": 490,
"preview": "HTML.MaxImgLength\nTYPE: int/null\nDEFAULT: 1200\nVERSION: 3.1.1\n--DESCRIPTION--\n<p>\n This directive controls the maximum n"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt",
"chars": 314,
"preview": "HTML.Parent\nTYPE: string\nVERSION: 1.3.0\nDEFAULT: 'div'\n--DESCRIPTION--\n\n<p>\n String name of element that HTML fragmen"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt",
"chars": 334,
"preview": "HTML.Proprietary\nTYPE: bool\nVERSION: 3.1.0\nDEFAULT: false\n--DESCRIPTION--\n<p>\n Whether or not to allow proprietary el"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt",
"chars": 491,
"preview": "HTML.SafeEmbed\nTYPE: bool\nVERSION: 3.1.1\nDEFAULT: false\n--DESCRIPTION--\n<p>\n Whether or not to permit embed tags in d"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt",
"chars": 520,
"preview": "HTML.SafeObject\nTYPE: bool\nVERSION: 3.1.1\nDEFAULT: false\n--DESCRIPTION--\n<p>\n Whether or not to permit object tags in"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt",
"chars": 221,
"preview": "HTML.Strict\nTYPE: bool\nVERSION: 1.3.0\nDEFAULT: false\nDEPRECATED-VERSION: 1.7.0\nDEPRECATED-USE: HTML.Doctype\n--DESCRIPTIO"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt",
"chars": 163,
"preview": "HTML.TidyAdd\nTYPE: lookup\nVERSION: 2.0.0\nDEFAULT: array()\n--DESCRIPTION--\n\nFixes to add to the default set of Tidy fixes"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt",
"chars": 620,
"preview": "HTML.TidyLevel\nTYPE: string\nVERSION: 2.0.0\nDEFAULT: 'medium'\n--DESCRIPTION--\n\n<p>General level of cleanliness the Tidy m"
},
{
"path": "libraries/purifier/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt",
"chars": 171,
"preview": "HTML.TidyRemove\nTYPE: lookup\nVERSION: 2.0.0\nDEFAULT: array()\n--DESCRIPTION--\n\nFixes to remove from the default set of Ti"
}
]
// ... and 187 more files (download for full content)
About this extraction
This page contains the full source code of the anantgarg/Qwench GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 387 files (1.2 MB), approximately 330.1k tokens, and a symbol index with 1037 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.