From 8a81066ae063e4bd7303bdef6ee455dd76606ae7 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Mon, 4 Jul 2016 10:04:24 -0500 Subject: [PATCH] Initial code import based on Amine's email 6/28/2016 --- bootstrap.php | 135 + css/app.css | 178 + css/editor.css | 156 + css/grid.css | 230 + css/tinymce.css | 10 + img/approve.png | Bin 0 -> 261 bytes img/clean.png | Bin 0 -> 629 bytes img/contribute.png | Bin 0 -> 546 bytes img/original.png | Bin 0 -> 484 bytes img/reject.png | Bin 0 -> 336 bytes inc/approve.php | 204 + inc/editor.php | 152 + inc/mail.php | 48 + inc/mail_templates/admin_submition.html | 89 + inc/mail_templates/visitor_approval.html | 84 + inc/mail_templates/visitor_submition.html | 95 + inc/main.php | 86 + inc/parser.php | 1742 ++++++ inc/settings.php | 71 + js/admin.js | 8 + js/approve.js | 121 + js/editor.js | 41 + js/jquery.js | 4 + js/jquery.validate.js | 1532 ++++++ vendor/autoload.php | 7 + vendor/caxy/php-htmldiff/CHANGELOG.md | 145 + vendor/caxy/php-htmldiff/CODE_OF_CONDUCT.md | 74 + vendor/caxy/php-htmldiff/CONTRIBUTING.md | 33 + vendor/caxy/php-htmldiff/LICENSE | 130 + vendor/caxy/php-htmldiff/README.md | 201 + vendor/caxy/php-htmldiff/composer.json | 43 + vendor/caxy/php-htmldiff/demo/README.md | 1 + vendor/caxy/php-htmldiff/demo/bower.json | 16 + vendor/caxy/php-htmldiff/demo/codes.css | 276 + .../caxy/php-htmldiff/demo/demo.controller.js | 212 + vendor/caxy/php-htmldiff/demo/demo.html | 246 + vendor/caxy/php-htmldiff/demo/demo.module.js | 9 + vendor/caxy/php-htmldiff/demo/demos.json | 1 + vendor/caxy/php-htmldiff/demo/diff.json | 1 + vendor/caxy/php-htmldiff/demo/index.php | 56 + .../php-htmldiff/demo/load_table_diff.php | 22 + vendor/caxy/php-htmldiff/demo/save_demo.php | 46 + vendor/caxy/php-htmldiff/demo/tablediffs.json | 1 + vendor/caxy/php-htmldiff/doc/differences.rst | 116 + .../lib/Caxy/HtmlDiff/AbstractDiff.php | 490 ++ .../lib/Caxy/HtmlDiff/DiffCache.php | 112 + .../lib/Caxy/HtmlDiff/HtmlDiff.php | 795 +++ .../lib/Caxy/HtmlDiff/HtmlDiffConfig.php | 488 ++ .../lib/Caxy/HtmlDiff/ListDiff.php | 944 ++++ .../lib/Caxy/HtmlDiff/ListDiff/DiffList.php | 102 + .../Caxy/HtmlDiff/ListDiff/DiffListItem.php | 124 + .../lib/Caxy/HtmlDiff/ListDiffNew.php | 280 + .../php-htmldiff/lib/Caxy/HtmlDiff/Match.php | 27 + .../lib/Caxy/HtmlDiff/Operation.php | 21 + .../HtmlDiff/Table/AbstractTableElement.php | 94 + .../Caxy/HtmlDiff/Table/DiffRowPosition.php | 268 + .../lib/Caxy/HtmlDiff/Table/RowMatch.php | 133 + .../lib/Caxy/HtmlDiff/Table/Table.php | 161 + .../lib/Caxy/HtmlDiff/Table/TableCell.php | 55 + .../lib/Caxy/HtmlDiff/Table/TableDiff.php | 921 ++++ .../lib/Caxy/HtmlDiff/Table/TableMatch.php | 75 + .../lib/Caxy/HtmlDiff/Table/TablePosition.php | 70 + .../lib/Caxy/HtmlDiff/Table/TableRow.php | 106 + vendor/caxy/php-htmldiff/phpunit.xml.dist | 26 + .../Functional/HtmlDiffFunctionalTest.php | 40 + .../Caxy/Tests/HtmlDiff/HtmlFileIterator.php | 103 + .../tests/Caxy/Tests/TestInit.php | 14 + .../tests/fixtures/HtmlDiff/ICC-5136.html | 13 + .../fixtures/HtmlDiff/first-and-last.html | 39 + .../HtmlDiff/issue-28-link-changes.html | 15 + .../HtmlDiff/new-paragraph-and-list.html | 20 + .../tests/fixtures/HtmlDiff/override-2.html | 18 + .../tests/fixtures/HtmlDiff/override-3.html | 29 + .../tests/fixtures/HtmlDiff/override-4.html | 28 + .../tests/fixtures/HtmlDiff/override-5.html | 31 + .../tests/fixtures/HtmlDiff/override-6.html | 42 + .../tests/fixtures/HtmlDiff/override-8.html | 11 + .../tests/fixtures/HtmlDiff/override-9.html | 11 + vendor/composer/ClassLoader.php | 413 ++ vendor/composer/LICENSE | 21 + vendor/composer/autoload_classmap.php | 9 + vendor/composer/autoload_files.php | 10 + vendor/composer/autoload_namespaces.php | 11 + vendor/composer/autoload_psr4.php | 9 + vendor/composer/autoload_real.php | 59 + vendor/composer/installed.json | 105 + vendor/ezyang/htmlpurifier/CREDITS | 9 + vendor/ezyang/htmlpurifier/INSTALL | 374 ++ vendor/ezyang/htmlpurifier/INSTALL.fr.utf8 | 60 + vendor/ezyang/htmlpurifier/LICENSE | 504 ++ vendor/ezyang/htmlpurifier/NEWS | 1094 ++++ vendor/ezyang/htmlpurifier/README | 24 + vendor/ezyang/htmlpurifier/TODO | 150 + vendor/ezyang/htmlpurifier/VERSION | 1 + vendor/ezyang/htmlpurifier/WHATSNEW | 4 + vendor/ezyang/htmlpurifier/WYSIWYG | 20 + vendor/ezyang/htmlpurifier/composer.json | 22 + .../extras/ConfigDoc/HTMLXSLTProcessor.php | 91 + vendor/ezyang/htmlpurifier/extras/FSTools.php | 164 + .../htmlpurifier/extras/FSTools/File.php | 141 + .../extras/HTMLPurifierExtras.auto.php | 11 + .../extras/HTMLPurifierExtras.autoload.php | 26 + .../extras/HTMLPurifierExtras.php | 31 + vendor/ezyang/htmlpurifier/extras/README | 32 + .../library/HTMLPurifier.auto.php | 11 + .../library/HTMLPurifier.autoload.php | 27 + .../library/HTMLPurifier.composer.php | 4 + .../library/HTMLPurifier.func.php | 25 + .../library/HTMLPurifier.includes.php | 229 + .../library/HTMLPurifier.kses.php | 30 + .../library/HTMLPurifier.path.php | 11 + .../htmlpurifier/library/HTMLPurifier.php | 292 + .../library/HTMLPurifier.safe-includes.php | 223 + .../library/HTMLPurifier/Arborize.php | 71 + .../library/HTMLPurifier/AttrCollections.php | 143 + .../library/HTMLPurifier/AttrDef.php | 138 + .../library/HTMLPurifier/AttrDef/CSS.php | 106 + .../HTMLPurifier/AttrDef/CSS/AlphaValue.php | 34 + .../HTMLPurifier/AttrDef/CSS/Background.php | 111 + .../AttrDef/CSS/BackgroundPosition.php | 157 + .../HTMLPurifier/AttrDef/CSS/Border.php | 56 + .../HTMLPurifier/AttrDef/CSS/Color.php | 105 + .../HTMLPurifier/AttrDef/CSS/Composite.php | 48 + .../AttrDef/CSS/DenyElementDecorator.php | 44 + .../HTMLPurifier/AttrDef/CSS/Filter.php | 77 + .../library/HTMLPurifier/AttrDef/CSS/Font.php | 176 + .../HTMLPurifier/AttrDef/CSS/FontFamily.php | 219 + .../HTMLPurifier/AttrDef/CSS/Ident.php | 32 + .../AttrDef/CSS/ImportantDecorator.php | 56 + .../HTMLPurifier/AttrDef/CSS/Length.php | 77 + .../HTMLPurifier/AttrDef/CSS/ListStyle.php | 112 + .../HTMLPurifier/AttrDef/CSS/Multiple.php | 71 + .../HTMLPurifier/AttrDef/CSS/Number.php | 84 + .../HTMLPurifier/AttrDef/CSS/Percentage.php | 54 + .../AttrDef/CSS/TextDecoration.php | 46 + .../library/HTMLPurifier/AttrDef/CSS/URI.php | 74 + .../library/HTMLPurifier/AttrDef/Clone.php | 44 + .../library/HTMLPurifier/AttrDef/Enum.php | 73 + .../HTMLPurifier/AttrDef/HTML/Bool.php | 48 + .../HTMLPurifier/AttrDef/HTML/Class.php | 48 + .../HTMLPurifier/AttrDef/HTML/Color.php | 51 + .../HTMLPurifier/AttrDef/HTML/FrameTarget.php | 38 + .../library/HTMLPurifier/AttrDef/HTML/ID.php | 105 + .../HTMLPurifier/AttrDef/HTML/Length.php | 56 + .../HTMLPurifier/AttrDef/HTML/LinkTypes.php | 72 + .../HTMLPurifier/AttrDef/HTML/MultiLength.php | 60 + .../HTMLPurifier/AttrDef/HTML/Nmtokens.php | 70 + .../HTMLPurifier/AttrDef/HTML/Pixels.php | 76 + .../library/HTMLPurifier/AttrDef/Integer.php | 91 + .../library/HTMLPurifier/AttrDef/Lang.php | 86 + .../library/HTMLPurifier/AttrDef/Switch.php | 53 + .../library/HTMLPurifier/AttrDef/Text.php | 21 + .../library/HTMLPurifier/AttrDef/URI.php | 111 + .../HTMLPurifier/AttrDef/URI/Email.php | 20 + .../AttrDef/URI/Email/SimpleCheck.php | 29 + .../library/HTMLPurifier/AttrDef/URI/Host.php | 128 + .../library/HTMLPurifier/AttrDef/URI/IPv4.php | 45 + .../library/HTMLPurifier/AttrDef/URI/IPv6.php | 89 + .../library/HTMLPurifier/AttrTransform.php | 60 + .../HTMLPurifier/AttrTransform/Background.php | 28 + .../HTMLPurifier/AttrTransform/BdoDir.php | 27 + .../HTMLPurifier/AttrTransform/BgColor.php | 28 + .../HTMLPurifier/AttrTransform/BoolToCSS.php | 47 + .../HTMLPurifier/AttrTransform/Border.php | 26 + .../HTMLPurifier/AttrTransform/EnumToCSS.php | 68 + .../AttrTransform/ImgRequired.php | 48 + .../HTMLPurifier/AttrTransform/ImgSpace.php | 61 + .../HTMLPurifier/AttrTransform/Input.php | 56 + .../HTMLPurifier/AttrTransform/Lang.php | 31 + .../HTMLPurifier/AttrTransform/Length.php | 45 + .../HTMLPurifier/AttrTransform/Name.php | 33 + .../HTMLPurifier/AttrTransform/NameSync.php | 41 + .../HTMLPurifier/AttrTransform/Nofollow.php | 52 + .../HTMLPurifier/AttrTransform/SafeEmbed.php | 25 + .../HTMLPurifier/AttrTransform/SafeObject.php | 28 + .../HTMLPurifier/AttrTransform/SafeParam.php | 79 + .../AttrTransform/ScriptRequired.php | 23 + .../AttrTransform/TargetBlank.php | 45 + .../HTMLPurifier/AttrTransform/Textarea.php | 27 + .../library/HTMLPurifier/AttrTypes.php | 96 + .../library/HTMLPurifier/AttrValidator.php | 178 + .../library/HTMLPurifier/Bootstrap.php | 124 + .../library/HTMLPurifier/CSSDefinition.php | 474 ++ .../library/HTMLPurifier/ChildDef.php | 52 + .../HTMLPurifier/ChildDef/Chameleon.php | 67 + .../library/HTMLPurifier/ChildDef/Custom.php | 102 + .../library/HTMLPurifier/ChildDef/Empty.php | 38 + .../library/HTMLPurifier/ChildDef/List.php | 86 + .../HTMLPurifier/ChildDef/Optional.php | 45 + .../HTMLPurifier/ChildDef/Required.php | 118 + .../ChildDef/StrictBlockquote.php | 110 + .../library/HTMLPurifier/ChildDef/Table.php | 224 + .../library/HTMLPurifier/Config.php | 920 ++++ .../library/HTMLPurifier/ConfigSchema.php | 176 + .../ConfigSchema/Builder/ConfigSchema.php | 48 + .../HTMLPurifier/ConfigSchema/Builder/Xml.php | 144 + .../HTMLPurifier/ConfigSchema/Exception.php | 11 + .../HTMLPurifier/ConfigSchema/Interchange.php | 47 + .../ConfigSchema/Interchange/Directive.php | 89 + .../ConfigSchema/Interchange/Id.php | 58 + .../ConfigSchema/InterchangeBuilder.php | 226 + .../HTMLPurifier/ConfigSchema/Validator.php | 248 + .../ConfigSchema/ValidatorAtom.php | 130 + .../HTMLPurifier/ConfigSchema/schema.ser | Bin 0 -> 15305 bytes .../schema/Attr.AllowedClasses.txt | 8 + .../schema/Attr.AllowedFrameTargets.txt | 12 + .../ConfigSchema/schema/Attr.AllowedRel.txt | 9 + .../ConfigSchema/schema/Attr.AllowedRev.txt | 9 + .../schema/Attr.ClassUseCDATA.txt | 19 + .../schema/Attr.DefaultImageAlt.txt | 11 + .../schema/Attr.DefaultInvalidImage.txt | 9 + .../schema/Attr.DefaultInvalidImageAlt.txt | 8 + .../schema/Attr.DefaultTextDir.txt | 10 + .../ConfigSchema/schema/Attr.EnableID.txt | 16 + .../schema/Attr.ForbiddenClasses.txt | 8 + .../ConfigSchema/schema/Attr.IDBlacklist.txt | 5 + .../schema/Attr.IDBlacklistRegexp.txt | 9 + .../ConfigSchema/schema/Attr.IDPrefix.txt | 12 + .../schema/Attr.IDPrefixLocal.txt | 14 + .../schema/AutoFormat.AutoParagraph.txt | 31 + .../ConfigSchema/schema/AutoFormat.Custom.txt | 12 + .../schema/AutoFormat.DisplayLinkURI.txt | 11 + .../schema/AutoFormat.Linkify.txt | 12 + .../AutoFormat.PurifierLinkify.DocURL.txt | 12 + .../schema/AutoFormat.PurifierLinkify.txt | 12 + .../AutoFormat.RemoveEmpty.Predicate.txt | 14 + ...rmat.RemoveEmpty.RemoveNbsp.Exceptions.txt | 11 + .../AutoFormat.RemoveEmpty.RemoveNbsp.txt | 15 + .../schema/AutoFormat.RemoveEmpty.txt | 46 + ...utoFormat.RemoveSpansWithoutAttributes.txt | 11 + .../schema/CSS.AllowImportant.txt | 8 + .../ConfigSchema/schema/CSS.AllowTricky.txt | 11 + .../ConfigSchema/schema/CSS.AllowedFonts.txt | 12 + .../schema/CSS.AllowedProperties.txt | 18 + .../ConfigSchema/schema/CSS.DefinitionRev.txt | 11 + .../schema/CSS.ForbiddenProperties.txt | 13 + .../ConfigSchema/schema/CSS.MaxImgLength.txt | 16 + .../ConfigSchema/schema/CSS.Proprietary.txt | 10 + .../ConfigSchema/schema/CSS.Trusted.txt | 9 + .../schema/Cache.DefinitionImpl.txt | 14 + .../schema/Cache.SerializerPath.txt | 13 + .../schema/Cache.SerializerPermissions.txt | 11 + .../schema/Core.AggressivelyFixLt.txt | 18 + .../schema/Core.AllowHostnameUnderscore.txt | 16 + .../schema/Core.CollectErrors.txt | 12 + .../schema/Core.ColorKeywords.txt | 29 + .../schema/Core.ConvertDocumentToFragment.txt | 14 + .../Core.DirectLexLineNumberSyncInterval.txt | 17 + .../schema/Core.DisableExcludes.txt | 14 + .../ConfigSchema/schema/Core.EnableIDNA.txt | 9 + .../ConfigSchema/schema/Core.Encoding.txt | 15 + .../schema/Core.EscapeInvalidChildren.txt | 12 + .../schema/Core.EscapeInvalidTags.txt | 7 + .../schema/Core.EscapeNonASCIICharacters.txt | 13 + .../schema/Core.HiddenElements.txt | 19 + .../ConfigSchema/schema/Core.Language.txt | 10 + .../ConfigSchema/schema/Core.LexerImpl.txt | 34 + .../schema/Core.MaintainLineNumbers.txt | 16 + .../schema/Core.NormalizeNewlines.txt | 11 + .../schema/Core.RemoveInvalidImg.txt | 12 + .../Core.RemoveProcessingInstructions.txt | 11 + .../schema/Core.RemoveScriptContents.txt | 12 + .../ConfigSchema/schema/Filter.Custom.txt | 11 + .../Filter.ExtractStyleBlocks.Escaping.txt | 14 + .../Filter.ExtractStyleBlocks.Scope.txt | 29 + .../Filter.ExtractStyleBlocks.TidyImpl.txt | 16 + .../schema/Filter.ExtractStyleBlocks.txt | 74 + .../ConfigSchema/schema/Filter.YouTube.txt | 16 + .../ConfigSchema/schema/HTML.Allowed.txt | 25 + .../schema/HTML.AllowedAttributes.txt | 19 + .../schema/HTML.AllowedComments.txt | 10 + .../schema/HTML.AllowedCommentsRegexp.txt | 15 + .../schema/HTML.AllowedElements.txt | 23 + .../schema/HTML.AllowedModules.txt | 20 + .../schema/HTML.Attr.Name.UseCDATA.txt | 11 + .../ConfigSchema/schema/HTML.BlockWrapper.txt | 18 + .../ConfigSchema/schema/HTML.CoreModules.txt | 23 + .../schema/HTML.CustomDoctype.txt | 9 + .../ConfigSchema/schema/HTML.DefinitionID.txt | 33 + .../schema/HTML.DefinitionRev.txt | 16 + .../ConfigSchema/schema/HTML.Doctype.txt | 11 + .../schema/HTML.FlashAllowFullScreen.txt | 11 + .../schema/HTML.ForbiddenAttributes.txt | 21 + .../schema/HTML.ForbiddenElements.txt | 20 + .../ConfigSchema/schema/HTML.MaxImgLength.txt | 14 + .../ConfigSchema/schema/HTML.Nofollow.txt | 7 + .../ConfigSchema/schema/HTML.Parent.txt | 12 + .../ConfigSchema/schema/HTML.Proprietary.txt | 12 + .../ConfigSchema/schema/HTML.SafeEmbed.txt | 13 + .../ConfigSchema/schema/HTML.SafeIframe.txt | 13 + .../ConfigSchema/schema/HTML.SafeObject.txt | 13 + .../schema/HTML.SafeScripting.txt | 10 + .../ConfigSchema/schema/HTML.Strict.txt | 9 + .../ConfigSchema/schema/HTML.TargetBlank.txt | 8 + .../ConfigSchema/schema/HTML.TidyAdd.txt | 8 + .../ConfigSchema/schema/HTML.TidyLevel.txt | 24 + .../ConfigSchema/schema/HTML.TidyRemove.txt | 8 + .../ConfigSchema/schema/HTML.Trusted.txt | 9 + .../ConfigSchema/schema/HTML.XHTML.txt | 11 + .../schema/Output.CommentScriptContents.txt | 10 + .../schema/Output.FixInnerHTML.txt | 15 + .../schema/Output.FlashCompat.txt | 11 + .../ConfigSchema/schema/Output.Newline.txt | 13 + .../ConfigSchema/schema/Output.SortAttr.txt | 14 + .../ConfigSchema/schema/Output.TidyFormat.txt | 25 + .../ConfigSchema/schema/Test.ForceNoIconv.txt | 7 + .../schema/URI.AllowedSchemes.txt | 17 + .../ConfigSchema/schema/URI.Base.txt | 17 + .../ConfigSchema/schema/URI.DefaultScheme.txt | 10 + .../ConfigSchema/schema/URI.DefinitionID.txt | 11 + .../ConfigSchema/schema/URI.DefinitionRev.txt | 11 + .../ConfigSchema/schema/URI.Disable.txt | 14 + .../schema/URI.DisableExternal.txt | 11 + .../schema/URI.DisableExternalResources.txt | 13 + .../schema/URI.DisableResources.txt | 15 + .../ConfigSchema/schema/URI.Host.txt | 19 + .../ConfigSchema/schema/URI.HostBlacklist.txt | 9 + .../ConfigSchema/schema/URI.MakeAbsolute.txt | 13 + .../ConfigSchema/schema/URI.Munge.txt | 83 + .../schema/URI.MungeResources.txt | 17 + .../schema/URI.MungeSecretKey.txt | 30 + .../schema/URI.OverrideAllowedSchemes.txt | 9 + .../schema/URI.SafeIframeRegexp.txt | 22 + .../HTMLPurifier/ConfigSchema/schema/info.ini | 3 + .../library/HTMLPurifier/ContentSets.php | 170 + .../library/HTMLPurifier/Context.php | 95 + .../library/HTMLPurifier/Definition.php | 55 + .../library/HTMLPurifier/DefinitionCache.php | 129 + .../DefinitionCache/Decorator.php | 112 + .../DefinitionCache/Decorator/Cleanup.php | 78 + .../DefinitionCache/Decorator/Memory.php | 85 + .../DefinitionCache/Decorator/Template.php.in | 82 + .../HTMLPurifier/DefinitionCache/Null.php | 76 + .../DefinitionCache/Serializer.php | 291 + .../DefinitionCache/Serializer/README | 3 + .../HTMLPurifier/DefinitionCacheFactory.php | 106 + .../library/HTMLPurifier/Doctype.php | 73 + .../library/HTMLPurifier/DoctypeRegistry.php | 142 + .../library/HTMLPurifier/ElementDef.php | 216 + .../library/HTMLPurifier/Encoder.php | 611 +++ .../library/HTMLPurifier/EntityLookup.php | 48 + .../HTMLPurifier/EntityLookup/entities.ser | 1 + .../library/HTMLPurifier/EntityParser.php | 153 + .../library/HTMLPurifier/ErrorCollector.php | 244 + .../library/HTMLPurifier/ErrorStruct.php | 74 + .../library/HTMLPurifier/Exception.php | 12 + .../library/HTMLPurifier/Filter.php | 56 + .../Filter/ExtractStyleBlocks.php | 338 ++ .../library/HTMLPurifier/Filter/YouTube.php | 65 + .../library/HTMLPurifier/Generator.php | 286 + .../library/HTMLPurifier/HTMLDefinition.php | 493 ++ .../library/HTMLPurifier/HTMLModule.php | 284 + .../library/HTMLPurifier/HTMLModule/Bdo.php | 44 + .../HTMLModule/CommonAttributes.php | 31 + .../library/HTMLPurifier/HTMLModule/Edit.php | 55 + .../library/HTMLPurifier/HTMLModule/Forms.php | 190 + .../HTMLPurifier/HTMLModule/Hypertext.php | 40 + .../HTMLPurifier/HTMLModule/Iframe.php | 51 + .../library/HTMLPurifier/HTMLModule/Image.php | 49 + .../HTMLPurifier/HTMLModule/Legacy.php | 186 + .../library/HTMLPurifier/HTMLModule/List.php | 51 + .../library/HTMLPurifier/HTMLModule/Name.php | 26 + .../HTMLPurifier/HTMLModule/Nofollow.php | 25 + .../HTMLModule/NonXMLCommonAttributes.php | 20 + .../HTMLPurifier/HTMLModule/Object.php | 62 + .../HTMLPurifier/HTMLModule/Presentation.php | 42 + .../HTMLPurifier/HTMLModule/Proprietary.php | 40 + .../library/HTMLPurifier/HTMLModule/Ruby.php | 36 + .../HTMLPurifier/HTMLModule/SafeEmbed.php | 40 + .../HTMLPurifier/HTMLModule/SafeObject.php | 62 + .../HTMLPurifier/HTMLModule/SafeScripting.php | 40 + .../HTMLPurifier/HTMLModule/Scripting.php | 73 + .../HTMLModule/StyleAttribute.php | 33 + .../HTMLPurifier/HTMLModule/Tables.php | 75 + .../HTMLPurifier/HTMLModule/Target.php | 28 + .../HTMLPurifier/HTMLModule/TargetBlank.php | 24 + .../library/HTMLPurifier/HTMLModule/Text.php | 87 + .../library/HTMLPurifier/HTMLModule/Tidy.php | 230 + .../HTMLPurifier/HTMLModule/Tidy/Name.php | 33 + .../HTMLModule/Tidy/Proprietary.php | 34 + .../HTMLPurifier/HTMLModule/Tidy/Strict.php | 43 + .../HTMLModule/Tidy/Transitional.php | 16 + .../HTMLPurifier/HTMLModule/Tidy/XHTML.php | 26 + .../HTMLModule/Tidy/XHTMLAndHTML4.php | 179 + .../HTMLModule/XMLCommonAttributes.php | 20 + .../HTMLPurifier/HTMLModuleManager.php | 459 ++ .../library/HTMLPurifier/IDAccumulator.php | 57 + .../library/HTMLPurifier/Injector.php | 281 + .../HTMLPurifier/Injector/AutoParagraph.php | 356 ++ .../HTMLPurifier/Injector/DisplayLinkURI.php | 40 + .../library/HTMLPurifier/Injector/Linkify.php | 59 + .../HTMLPurifier/Injector/PurifierLinkify.php | 71 + .../HTMLPurifier/Injector/RemoveEmpty.php | 106 + .../Injector/RemoveSpansWithoutAttributes.php | 84 + .../HTMLPurifier/Injector/SafeObject.php | 121 + .../library/HTMLPurifier/Language.php | 204 + .../Language/classes/en-x-test.php | 9 + .../Language/messages/en-x-test.php | 11 + .../Language/messages/en-x-testmini.php | 12 + .../HTMLPurifier/Language/messages/en.php | 55 + .../library/HTMLPurifier/LanguageFactory.php | 209 + .../library/HTMLPurifier/Length.php | 160 + .../library/HTMLPurifier/Lexer.php | 357 ++ .../library/HTMLPurifier/Lexer/DOMLex.php | 279 + .../library/HTMLPurifier/Lexer/DirectLex.php | 539 ++ .../library/HTMLPurifier/Lexer/PH5P.php | 4787 +++++++++++++++++ .../library/HTMLPurifier/Node.php | 49 + .../library/HTMLPurifier/Node/Comment.php | 36 + .../library/HTMLPurifier/Node/Element.php | 59 + .../library/HTMLPurifier/Node/Text.php | 54 + .../library/HTMLPurifier/PercentEncoder.php | 111 + .../library/HTMLPurifier/Printer.php | 218 + .../HTMLPurifier/Printer/CSSDefinition.php | 44 + .../HTMLPurifier/Printer/ConfigForm.css | 10 + .../HTMLPurifier/Printer/ConfigForm.js | 5 + .../HTMLPurifier/Printer/ConfigForm.php | 447 ++ .../HTMLPurifier/Printer/HTMLDefinition.php | 324 ++ .../library/HTMLPurifier/PropertyList.php | 122 + .../HTMLPurifier/PropertyListIterator.php | 42 + .../library/HTMLPurifier/Queue.php | 56 + .../library/HTMLPurifier/Strategy.php | 26 + .../HTMLPurifier/Strategy/Composite.php | 30 + .../library/HTMLPurifier/Strategy/Core.php | 17 + .../HTMLPurifier/Strategy/FixNesting.php | 181 + .../HTMLPurifier/Strategy/MakeWellFormed.php | 600 +++ .../Strategy/RemoveForeignElements.php | 207 + .../Strategy/ValidateAttributes.php | 45 + .../library/HTMLPurifier/StringHash.php | 47 + .../library/HTMLPurifier/StringHashParser.php | 136 + .../library/HTMLPurifier/TagTransform.php | 37 + .../HTMLPurifier/TagTransform/Font.php | 114 + .../HTMLPurifier/TagTransform/Simple.php | 44 + .../library/HTMLPurifier/Token.php | 100 + .../library/HTMLPurifier/Token/Comment.php | 38 + .../library/HTMLPurifier/Token/Empty.php | 15 + .../library/HTMLPurifier/Token/End.php | 24 + .../library/HTMLPurifier/Token/Start.php | 10 + .../library/HTMLPurifier/Token/Tag.php | 68 + .../library/HTMLPurifier/Token/Text.php | 53 + .../library/HTMLPurifier/TokenFactory.php | 118 + .../htmlpurifier/library/HTMLPurifier/URI.php | 314 ++ .../library/HTMLPurifier/URIDefinition.php | 112 + .../library/HTMLPurifier/URIFilter.php | 74 + .../URIFilter/DisableExternal.php | 54 + .../URIFilter/DisableExternalResources.php | 25 + .../URIFilter/DisableResources.php | 22 + .../HTMLPurifier/URIFilter/HostBlacklist.php | 46 + .../HTMLPurifier/URIFilter/MakeAbsolute.php | 158 + .../library/HTMLPurifier/URIFilter/Munge.php | 115 + .../HTMLPurifier/URIFilter/SafeIframe.php | 68 + .../library/HTMLPurifier/URIParser.php | 71 + .../library/HTMLPurifier/URIScheme.php | 102 + .../library/HTMLPurifier/URIScheme/data.php | 127 + .../library/HTMLPurifier/URIScheme/file.php | 44 + .../library/HTMLPurifier/URIScheme/ftp.php | 58 + .../library/HTMLPurifier/URIScheme/http.php | 36 + .../library/HTMLPurifier/URIScheme/https.php | 18 + .../library/HTMLPurifier/URIScheme/mailto.php | 40 + .../library/HTMLPurifier/URIScheme/news.php | 35 + .../library/HTMLPurifier/URIScheme/nntp.php | 32 + .../HTMLPurifier/URISchemeRegistry.php | 81 + .../library/HTMLPurifier/UnitConverter.php | 307 ++ .../library/HTMLPurifier/VarParser.php | 198 + .../HTMLPurifier/VarParser/Flexible.php | 130 + .../library/HTMLPurifier/VarParser/Native.php | 38 + .../HTMLPurifier/VarParserException.php | 11 + .../library/HTMLPurifier/Zipper.php | 157 + vendor/ezyang/htmlpurifier/package.php | 61 + vendor/ezyang/htmlpurifier/phpdoc.ini | 102 + vendor/ezyang/htmlpurifier/plugins/modx.txt | 112 + .../htmlpurifier/plugins/phorum/Changelog | 27 + .../htmlpurifier/plugins/phorum/INSTALL | 84 + .../ezyang/htmlpurifier/plugins/phorum/README | 45 + .../plugins/phorum/config.default.php | 57 + .../plugins/phorum/htmlpurifier.php | 316 ++ .../plugins/phorum/htmlpurifier/LICENSE | 504 ++ .../plugins/phorum/htmlpurifier/README | 3 + .../htmlpurifier/plugins/phorum/info.txt | 18 + .../plugins/phorum/init-config.php | 30 + .../plugins/phorum/migrate.bbcode.php | 31 + .../htmlpurifier/plugins/phorum/settings.php | 64 + .../plugins/phorum/settings/form.php | 95 + .../phorum/settings/migrate-sigs-form.php | 22 + .../plugins/phorum/settings/migrate-sigs.php | 79 + .../plugins/phorum/settings/save.php | 29 + .../ezyang/htmlpurifier/release1-update.php | 110 + vendor/ezyang/htmlpurifier/release2-tag.php | 22 + .../htmlpurifier/test-settings.sample.php | 76 + 488 files changed, 49069 insertions(+) create mode 100755 bootstrap.php create mode 100755 css/app.css create mode 100755 css/editor.css create mode 100755 css/grid.css create mode 100755 css/tinymce.css create mode 100755 img/approve.png create mode 100755 img/clean.png create mode 100755 img/contribute.png create mode 100755 img/original.png create mode 100755 img/reject.png create mode 100755 inc/approve.php create mode 100755 inc/editor.php create mode 100755 inc/mail.php create mode 100755 inc/mail_templates/admin_submition.html create mode 100755 inc/mail_templates/visitor_approval.html create mode 100755 inc/mail_templates/visitor_submition.html create mode 100755 inc/main.php create mode 100755 inc/parser.php create mode 100755 inc/settings.php create mode 100755 js/admin.js create mode 100755 js/approve.js create mode 100755 js/editor.js create mode 100755 js/jquery.js create mode 100755 js/jquery.validate.js create mode 100755 vendor/autoload.php create mode 100755 vendor/caxy/php-htmldiff/CHANGELOG.md create mode 100755 vendor/caxy/php-htmldiff/CODE_OF_CONDUCT.md create mode 100755 vendor/caxy/php-htmldiff/CONTRIBUTING.md create mode 100755 vendor/caxy/php-htmldiff/LICENSE create mode 100755 vendor/caxy/php-htmldiff/README.md create mode 100755 vendor/caxy/php-htmldiff/composer.json create mode 100755 vendor/caxy/php-htmldiff/demo/README.md create mode 100755 vendor/caxy/php-htmldiff/demo/bower.json create mode 100755 vendor/caxy/php-htmldiff/demo/codes.css create mode 100755 vendor/caxy/php-htmldiff/demo/demo.controller.js create mode 100755 vendor/caxy/php-htmldiff/demo/demo.html create mode 100755 vendor/caxy/php-htmldiff/demo/demo.module.js create mode 100755 vendor/caxy/php-htmldiff/demo/demos.json create mode 100755 vendor/caxy/php-htmldiff/demo/diff.json create mode 100755 vendor/caxy/php-htmldiff/demo/index.php create mode 100755 vendor/caxy/php-htmldiff/demo/load_table_diff.php create mode 100755 vendor/caxy/php-htmldiff/demo/save_demo.php create mode 100755 vendor/caxy/php-htmldiff/demo/tablediffs.json create mode 100755 vendor/caxy/php-htmldiff/doc/differences.rst create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/AbstractDiff.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/DiffCache.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiff.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiffConfig.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/ListDiff.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/ListDiff/DiffList.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/ListDiff/DiffListItem.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/ListDiffNew.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Match.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Operation.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/AbstractTableElement.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/DiffRowPosition.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/RowMatch.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/Table.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableCell.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableMatch.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TablePosition.php create mode 100755 vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableRow.php create mode 100755 vendor/caxy/php-htmldiff/phpunit.xml.dist create mode 100755 vendor/caxy/php-htmldiff/tests/Caxy/Tests/HtmlDiff/Functional/HtmlDiffFunctionalTest.php create mode 100755 vendor/caxy/php-htmldiff/tests/Caxy/Tests/HtmlDiff/HtmlFileIterator.php create mode 100755 vendor/caxy/php-htmldiff/tests/Caxy/Tests/TestInit.php create mode 100755 vendor/caxy/php-htmldiff/tests/fixtures/HtmlDiff/ICC-5136.html create mode 100755 vendor/caxy/php-htmldiff/tests/fixtures/HtmlDiff/first-and-last.html create mode 100755 vendor/caxy/php-htmldiff/tests/fixtures/HtmlDiff/issue-28-link-changes.html create mode 100755 vendor/caxy/php-htmldiff/tests/fixtures/HtmlDiff/new-paragraph-and-list.html create mode 100755 vendor/caxy/php-htmldiff/tests/fixtures/HtmlDiff/override-2.html create mode 100755 vendor/caxy/php-htmldiff/tests/fixtures/HtmlDiff/override-3.html create mode 100755 vendor/caxy/php-htmldiff/tests/fixtures/HtmlDiff/override-4.html create mode 100755 vendor/caxy/php-htmldiff/tests/fixtures/HtmlDiff/override-5.html create mode 100755 vendor/caxy/php-htmldiff/tests/fixtures/HtmlDiff/override-6.html create mode 100755 vendor/caxy/php-htmldiff/tests/fixtures/HtmlDiff/override-8.html create mode 100755 vendor/caxy/php-htmldiff/tests/fixtures/HtmlDiff/override-9.html create mode 100755 vendor/composer/ClassLoader.php create mode 100755 vendor/composer/LICENSE create mode 100755 vendor/composer/autoload_classmap.php create mode 100755 vendor/composer/autoload_files.php create mode 100755 vendor/composer/autoload_namespaces.php create mode 100755 vendor/composer/autoload_psr4.php create mode 100755 vendor/composer/autoload_real.php create mode 100755 vendor/composer/installed.json create mode 100755 vendor/ezyang/htmlpurifier/CREDITS create mode 100755 vendor/ezyang/htmlpurifier/INSTALL create mode 100755 vendor/ezyang/htmlpurifier/INSTALL.fr.utf8 create mode 100755 vendor/ezyang/htmlpurifier/LICENSE create mode 100755 vendor/ezyang/htmlpurifier/NEWS create mode 100755 vendor/ezyang/htmlpurifier/README create mode 100755 vendor/ezyang/htmlpurifier/TODO create mode 100755 vendor/ezyang/htmlpurifier/VERSION create mode 100755 vendor/ezyang/htmlpurifier/WHATSNEW create mode 100755 vendor/ezyang/htmlpurifier/WYSIWYG create mode 100755 vendor/ezyang/htmlpurifier/composer.json create mode 100755 vendor/ezyang/htmlpurifier/extras/ConfigDoc/HTMLXSLTProcessor.php create mode 100755 vendor/ezyang/htmlpurifier/extras/FSTools.php create mode 100755 vendor/ezyang/htmlpurifier/extras/FSTools/File.php create mode 100755 vendor/ezyang/htmlpurifier/extras/HTMLPurifierExtras.auto.php create mode 100755 vendor/ezyang/htmlpurifier/extras/HTMLPurifierExtras.autoload.php create mode 100755 vendor/ezyang/htmlpurifier/extras/HTMLPurifierExtras.php create mode 100755 vendor/ezyang/htmlpurifier/extras/README create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier.auto.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier.autoload.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier.composer.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier.func.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier.includes.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier.kses.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier.path.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier.safe-includes.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Background.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Border.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Color.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Composite.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Filter.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Font.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/FontFamily.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ident.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Length.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ListStyle.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Multiple.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Number.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Percentage.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Clone.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Enum.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Bool.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Class.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Color.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/MultiLength.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Pixels.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Integer.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Lang.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Switch.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Text.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Background.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BdoDir.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/EnumToCSS.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Input.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Lang.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Length.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Name.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/NameSync.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Nofollow.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeEmbed.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeObject.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeParam.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetBlank.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Textarea.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTypes.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrValidator.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Bootstrap.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/CSSDefinition.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Chameleon.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Custom.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Empty.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/List.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Optional.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Required.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/StrictBlockquote.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Table.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/Xml.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Exception.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Id.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Validator.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema.ser create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/info.ini create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ContentSets.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Context.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Definition.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Null.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/README create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCacheFactory.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Doctype.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ElementDef.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup/entities.ser create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityParser.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorCollector.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorStruct.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Exception.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/ExtractStyleBlocks.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Generator.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/CommonAttributes.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Edit.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Forms.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Hypertext.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Iframe.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Image.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Legacy.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Name.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Nofollow.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Proprietary.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Ruby.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeObject.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeScripting.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Scripting.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/StyleAttribute.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tables.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Target.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/TargetBlank.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Text.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Name.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Strict.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModuleManager.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/IDAccumulator.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/AutoParagraph.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/DisplayLinkURI.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/Linkify.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/PurifierLinkify.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/RemoveEmpty.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/SafeObject.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-test.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-testmini.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/messages/en.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/LanguageFactory.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Length.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DirectLex.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Comment.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Element.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Text.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/PercentEncoder.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.css create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.js create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/PropertyList.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Queue.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Composite.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Core.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/MakeWellFormed.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/RemoveForeignElements.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHash.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHashParser.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Font.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Simple.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Comment.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Empty.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/End.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Start.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Tag.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Text.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/TokenFactory.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URI.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIDefinition.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternal.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternalResources.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableResources.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/HostBlacklist.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/MakeAbsolute.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/Munge.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/SafeIframe.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIParser.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/data.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/file.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/ftp.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/http.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/https.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/mailto.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/news.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/nntp.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/URISchemeRegistry.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/UnitConverter.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParserException.php create mode 100755 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php create mode 100755 vendor/ezyang/htmlpurifier/package.php create mode 100755 vendor/ezyang/htmlpurifier/phpdoc.ini create mode 100755 vendor/ezyang/htmlpurifier/plugins/modx.txt create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/Changelog create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/INSTALL create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/README create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/config.default.php create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/htmlpurifier.php create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/htmlpurifier/LICENSE create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/htmlpurifier/README create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/info.txt create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/init-config.php create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/migrate.bbcode.php create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/settings.php create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/settings/form.php create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/settings/migrate-sigs-form.php create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/settings/migrate-sigs.php create mode 100755 vendor/ezyang/htmlpurifier/plugins/phorum/settings/save.php create mode 100755 vendor/ezyang/htmlpurifier/release1-update.php create mode 100755 vendor/ezyang/htmlpurifier/release2-tag.php create mode 100755 vendor/ezyang/htmlpurifier/test-settings.sample.php diff --git a/bootstrap.php b/bootstrap.php new file mode 100755 index 0000000..a2a942b --- /dev/null +++ b/bootstrap.php @@ -0,0 +1,135 @@ + + + "

Propose an edit

" + ]); + global $post; + $new_content = str_replace("#post_link#", get_site_url().'/'.$post->post_name.'/suggestions', stripcslashes($options["propose_edit_link"])); + $content .= $new_content; + } + return $content; + } + public function install(){ + //General Settings + delete_option("visitors_edits_options"); + //Database Settings + global $wpdb; + $wpdb->show_errors(); + + $charset_collate = $wpdb->get_charset_collate(); + $table_name = $wpdb->prefix . 'visitors_edits'; + + $sql = "CREATE TABLE $table_name ( + edit_id bigint(20) NOT NULL AUTO_INCREMENT, + edit_time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, + visitor_name text DEFAULT '', + visitor_email text DEFAULT '', + visitor_comment longtext DEFAULT '', + edit_content longtext DEFAULT '', + post_id bigint(20), + post_content longtext DEFAULT '', + UNIQUE KEY (edit_id) + ) $charset_collate;"; + + require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); + dbDelta( $sql ); + } + public function query_vars($query_vars){ + $query_vars[] = 'visitors_edits_post_name'; + return $query_vars; + } + public function init(){ + add_rewrite_rule( + '(.*)?/suggestions/?$', + 'index.php?visitors_edits_post_name=$matches[1]', + 'top' + ); + flush_rewrite_rules(true); + } + public function parse_request($request){ + if( isset( $request->query_vars['visitors_edits_post_name'] ) ): + include( plugin_dir_path(__FILE__) . "/inc/editor.php" ); + exit(); + endif; + return $request; + } + public function tinymce_btns($buttons){ + if(isset($_GET["page"]) && $_GET["page"]==="visitors_edits_approve"){ + array_push($buttons,'|','visitors_edits_approve','visitors_edits_reject','visitors_edits_clean'); + } + return $buttons; + } + public function tinymce_scripts($plugin_array){ + $plugin_array['visitors_edits'] = plugins_url( 'js/approve.js',__FILE__ ); + return $plugin_array; + } + static function scriptUrl($script){ + return plugins_url( 'js/'.$script.'.js',__FILE__); + } +} +new visitors_edits(); + +use Caxy\HtmlDiff\HtmlDiff; +use PHPHtmlParser\Dom; + +function visitors_editsDIFF($oldHtml,$newHtml){ + require "vendor/autoload.php"; + $htmlDiff = new HtmlDiff($oldHtml, $newHtml); + $htmlDiff->getConfig()->setGroupDiffs(false); + + return $htmlDiff->build(); +} +function visitors_editsDOM(){ + return new Dom; +} +?> \ No newline at end of file diff --git a/css/app.css b/css/app.css new file mode 100755 index 0000000..76a0e95 --- /dev/null +++ b/css/app.css @@ -0,0 +1,178 @@ +@import url("https://fonts.googleapis.com/css?family=Roboto:100,400,700"); +/* line 3, ../sass/app.scss */ +.visitors_edits_no_data { + text-align: center; + font-weight: bold; + font-size: 50px; + margin-top: 250px; + opacity: 0.3; + text-transform: uppercase; + display: none; +} + +/* line 12, ../sass/app.scss */ +.visitors_edits_pending { + padding: 15px; +} +/* line 14, ../sass/app.scss */ +.visitors_edits_pending h1 { + font-weight: 100; + font-size: 20px; +} + +/* line 22, ../sass/app.scss */ +.visitors_flashMessage { + margin: 15px; + background: #fff; + padding: 10px 15px; + border-left: 6px solid #089D08; + color: #089D08; + font-size: 14px; + font-weight: 100; +} +/* line 30, ../sass/app.scss */ +.visitors_flashMessage.danger { + color: #F6214E; + border-color: #F6214E; +} + +/* line 36, ../sass/app.scss */ +.visitors_edits_review_editor { + padding: 15px; +} +/* line 38, ../sass/app.scss */ +.visitors_edits_review_editor h1 { + font-weight: 100; + font-size: 25px; + display: inline-block; + margin-right: 15px; + margin-bottom: 10px; +} +/* line 45, ../sass/app.scss */ +.visitors_edits_review_editor .delete_edit { + transition-duration: 0.3s; + color: #F6214E; + text-decoration: none; + text-decoration: underline; + font-style: italic; + font-style: 12px; + opacity: 0.6; +} +/* line 53, ../sass/app.scss */ +.visitors_edits_review_editor .delete_edit:hover { + opacity: 1; +} +/* line 57, ../sass/app.scss */ +.visitors_edits_review_editor .edit_info, .visitors_edits_review_editor .edit_notify { + padding-left: 15px; + font-style: italic; + opacity: 0.8; + font-size: 14px; +} +/* line 62, ../sass/app.scss */ +.visitors_edits_review_editor .edit_info .mail, .visitors_edits_review_editor .edit_notify .mail { + opacity: 0.6; + font-size: 12px; +} +/* line 67, ../sass/app.scss */ +.visitors_edits_review_editor .edit_notify { + margin: 10px 0; + padding: 0; +} +/* line 70, ../sass/app.scss */ +.visitors_edits_review_editor .edit_notify label { + display: block; + margin-bottom: 10px; +} +/* line 74, ../sass/app.scss */ +.visitors_edits_review_editor .edit_notify #edit_notify_message { + font-family: "Roboto",sans-serif; + max-height: 100px; + min-height: 100px; + max-width: 100%; + min-width: 100%; + line-height: normal; + border: none; + border-bottom: 1px solid #DFDFDF; + font-size: 18px; + padding: 10px; + display: none; +} +/* line 85, ../sass/app.scss */ +.visitors_edits_review_editor .edit_notify #edit_notify_message:focus { + outline: none; + border-bottom-width: 2px; + border-color: rgba(3, 133, 244, 0.7); +} +/* line 93, ../sass/app.scss */ +.visitors_edits_review_editor .controls { + margin-top: 20px; +} +/* line 96, ../sass/app.scss */ +.visitors_edits_review_editor .comment { + font-size: 14px; + margin: 0; + padding: 10px; + background: #fff; + border: 1px solid #999; + font-style: normal; + opacity: 1; + color: #000; +} + +/* line 107, ../sass/app.scss */ +.visitors_edits_admin { + font-family: "Roboto",sans-serif; + width: 70%; + margin: 50px auto; + background: #fff; + border: 1px solid #E2E2E2; + padding: 20px; +} +/* line 114, ../sass/app.scss */ +.visitors_edits_admin h2 { + font-size: 25px; + font-weight: 100; +} +/* line 120, ../sass/app.scss */ +.visitors_edits_admin .control label { + display: block; + font-weight: bold; + margin: 15px 0 0; + opacity: 0.9; + font-size: 13px; +} +/* line 127, ../sass/app.scss */ +.visitors_edits_admin .control input[type="text"], .visitors_edits_admin .control .notif_message { + background: #F3F3F3; + outline: none; + padding: 0 10px; + height: 40px; + line-height: normal; + border: none; + border-bottom: 1px solid #DFDFDF; + width: 100%; +} +/* line 136, ../sass/app.scss */ +.visitors_edits_admin .control input[type="text"]:focus, .visitors_edits_admin .control .notif_message:focus { + outline: none; + border-bottom-width: 2px; + border-color: rgba(3, 133, 244, 0.7); +} +/* line 142, ../sass/app.scss */ +.visitors_edits_admin .control .notif_message { + min-height: 120px; + max-height: 120px; + padding: 10px; + min-width: 100%; + max-width: 100%; + line-height: normal; +} +/* line 150, ../sass/app.scss */ +.visitors_edits_admin .control input[type="checkbox"] { + margin-right: 10px; +} +/* line 153, ../sass/app.scss */ +.visitors_edits_admin .control .save_btn { + margin-top: 20px; +} diff --git a/css/editor.css b/css/editor.css new file mode 100755 index 0000000..0d54345 --- /dev/null +++ b/css/editor.css @@ -0,0 +1,156 @@ +@import url("https://fonts.googleapis.com/css?family=Roboto:100,400,700"); +/* line 7, ../sass/editor.scss */ +body { + font-family: "Roboto",sans-serif; + font-size: 18px; + color: #545454; + padding: 0; + margin: 0; +} + +/* line 14, ../sass/editor.scss */ +a { + text-decoration: none; + color: inherit; +} + +/* line 18, ../sass/editor.scss */ +* { + transition-duration: 0.3s; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +/* line 22, ../sass/editor.scss */ +.header { + padding: 20px 60px; + background: #0385F4; +} +/* line 25, ../sass/editor.scss */ +.header .header-title { + font-size: 50px; + font-weight: 100; + color: #fff; + opacity: 0.5; +} +/* line 31, ../sass/editor.scss */ +.header .header-content { + font-weight: 100; + color: #fff; + text-align: right; + font-size: 14px; + opacity: 0.7; +} +/* line 37, ../sass/editor.scss */ +.header .header-content:hover { + opacity: 0.9; +} + +/* line 42, ../sass/editor.scss */ +.editor_form { + padding: 20px 40px; + overflow: hidden; + width: 100%; +} +/* line 46, ../sass/editor.scss */ +.editor_form .editor_field { + background: #f5f5f5; + padding: 15px; +} +/* line 50, ../sass/editor.scss */ +.editor_form .submit_fields { + padding: 0 20px; +} + +/* line 55, ../sass/editor.scss */ +label { + display: block; + margin: 30px 0 10px; +} + +/* line 59, ../sass/editor.scss */ +.text_field, .area_field { + height: 40px; + line-height: 40px; + border: none; + border-bottom: 1px solid #DFDFDF; + width: 100%; + font-size: 18px; +} +/* line 66, ../sass/editor.scss */ +.text_field:focus, .area_field:focus { + outline: none; + border-bottom-width: 2px; + border-color: rgba(3, 133, 244, 0.7); +} + +/* line 72, ../sass/editor.scss */ +.area_field { + font-family: "Roboto",sans-serif; + max-height: 100px; + min-height: 100px; + max-width: 100%; + min-width: 100%; + line-height: normal; +} + +/* line 80, ../sass/editor.scss */ +.submit_fields_error { + line-height: 20px; + font-style: italic; + font-size: 12px; + opacity: 0.8; + color: #e74c3c; +} + +/* line 87, ../sass/editor.scss */ +.btn { + height: 40px; + color: #fff; + line-height: 40px; + padding: 0 20px; + text-transform: uppercase; + background: #0385F4; + border: 1px solid #0385F4; + cursor: pointer; + margin: 20px 0; +} +/* line 97, ../sass/editor.scss */ +.btn:hover { + color: #0385F4; + background: #fff; +} + +/* line 102, ../sass/editor.scss */ +.cb { + clear: both; +} + +/* line 105, ../sass/editor.scss */ +.grey { + background: #f5f5f5; +} + +/* line 108, ../sass/editor.scss */ +.submit_success { + margin-top: 200px; + background: #0385F4; + padding: 30px; + color: #fff; +} +/* line 113, ../sass/editor.scss */ +.submit_success .alert_title { + font-size: 40px; + opacity: 0.4; +} +/* line 117, ../sass/editor.scss */ +.submit_success .alert_content { + font-weight: 100; +} +/* line 120, ../sass/editor.scss */ +.submit_success .alert_footer { + opacity: 0.7; + font-size: 12px; + font-style: italic; +} diff --git a/css/grid.css b/css/grid.css new file mode 100755 index 0000000..4280774 --- /dev/null +++ b/css/grid.css @@ -0,0 +1,230 @@ +/* line 2, style.scss */ +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* line 3, style.scss */ +body { + margin: 0; + padding: 0; + font-family: sans-serif; +} + +/* line 6, _grid.scss */ +.col-1, .col-m-1, .col-l-1, .col-2, .col-m-2, .col-l-2, .col-3, .col-m-3, .col-l-3, .col-4, .col-m-4, .col-l-4, .col-5, .col-m-5, .col-l-5, .col-6, .col-m-6, .col-l-6, .col-7, .col-m-7, .col-l-7, .col-8, .col-m-8, .col-l-8, .col-9, .col-m-9, .col-l-9, .col-10, .col-m-10, .col-l-10, .col-11, .col-m-11, .col-l-11, .col-12, .col-m-12, .col-l-12 { + float: right; + position: relative; + min-height: 1px; + padding: 0 10px; + /*border: 1px solid rgba(255, 0, 0, 0.5);*/ +} + +/* line 16, _grid.scss */ +.col-1 { + width: 8.33333%; +} + +/* line 16, _grid.scss */ +.col-2 { + width: 16.66667%; +} + +/* line 16, _grid.scss */ +.col-3 { + width: 25%; +} + +/* line 16, _grid.scss */ +.col-4 { + width: 33.33333%; +} + +/* line 16, _grid.scss */ +.col-5 { + width: 41.66667%; +} + +/* line 16, _grid.scss */ +.col-6 { + width: 50%; +} + +/* line 16, _grid.scss */ +.col-7 { + width: 58.33333%; +} + +/* line 16, _grid.scss */ +.col-8 { + width: 66.66667%; +} + +/* line 16, _grid.scss */ +.col-9 { + width: 75%; +} + +/* line 16, _grid.scss */ +.col-10 { + width: 83.33333%; +} + +/* line 16, _grid.scss */ +.col-11 { + width: 91.66667%; +} + +/* line 16, _grid.scss */ +.col-12 { + width: 100%; +} + +/* line 23, _grid.scss */ +.row { + margin: 0 -10px; + overflow: hidden; + *zoom: 1; +} + +/* line 27, _grid.scss */ +.col-center { + margin: 0 auto; + float: none; +} + +@media only screen and (min-width: 640px) { + /* line 30, _grid.scss */ + .col-m-center { + margin: 0 auto; + float: none; + } + + /* line 32, _grid.scss */ + .col-m-1 { + width: 8.33333%; + } + + /* line 32, _grid.scss */ + .col-m-2 { + width: 16.66667%; + } + + /* line 32, _grid.scss */ + .col-m-3 { + width: 25%; + } + + /* line 32, _grid.scss */ + .col-m-4 { + width: 33.33333%; + } + + /* line 32, _grid.scss */ + .col-m-5 { + width: 41.66667%; + } + + /* line 32, _grid.scss */ + .col-m-6 { + width: 50%; + } + + /* line 32, _grid.scss */ + .col-m-7 { + width: 58.33333%; + } + + /* line 32, _grid.scss */ + .col-m-8 { + width: 66.66667%; + } + + /* line 32, _grid.scss */ + .col-m-9 { + width: 75%; + } + + /* line 32, _grid.scss */ + .col-m-10 { + width: 83.33333%; + } + + /* line 32, _grid.scss */ + .col-m-11 { + width: 91.66667%; + } + + /* line 32, _grid.scss */ + .col-m-12 { + width: 100%; + } +} +@media only screen and (min-width: 1024px) { + /* line 39, _grid.scss */ + .col-l-center { + margin: 0 auto; + float: none; + } + + /* line 41, _grid.scss */ + .col-l-1 { + width: 8.33333%; + } + + /* line 41, _grid.scss */ + .col-l-2 { + width: 16.66667%; + } + + /* line 41, _grid.scss */ + .col-l-3 { + width: 25%; + } + + /* line 41, _grid.scss */ + .col-l-4 { + width: 33.33333%; + } + + /* line 41, _grid.scss */ + .col-l-5 { + width: 41.66667%; + } + + /* line 41, _grid.scss */ + .col-l-6 { + width: 50%; + } + + /* line 41, _grid.scss */ + .col-l-7 { + width: 58.33333%; + } + + /* line 41, _grid.scss */ + .col-l-8 { + width: 66.66667%; + } + + /* line 41, _grid.scss */ + .col-l-9 { + width: 75%; + } + + /* line 41, _grid.scss */ + .col-l-10 { + width: 83.33333%; + } + + /* line 41, _grid.scss */ + .col-l-11 { + width: 91.66667%; + } + + /* line 41, _grid.scss */ + .col-l-12 { + width: 100%; + } +} diff --git a/css/tinymce.css b/css/tinymce.css new file mode 100755 index 0000000..e09873e --- /dev/null +++ b/css/tinymce.css @@ -0,0 +1,10 @@ +ins{ + background: transparent !important; + color: inherit !important; +} +.diffins{ + background:#4DB1FB !important; +} +.diffmod{ + background:#4DFB74 !important; +} \ No newline at end of file diff --git a/img/approve.png b/img/approve.png new file mode 100755 index 0000000000000000000000000000000000000000..6196c7cea3778ae2cf3e5eb67d8ccbd3a70454bf GIT binary patch literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaN3?zjj6;1;w=3*z$5DpHG+YkL80J)q69+AZi z42&BBusRa0h zxc>kDAIO9OCI$v5Vq{=sWMG0I29;nVpbDOnAirP+9#NT$%)E+ymu@|}_r0JAC~ocP z;us=vIXOW=a)si?nah+5O}JO+C^qO^>{@eJi@}rqb5P3SHB1wFlH$5@+Cv2<$(~s~ fQ77F%(NKV4LNo8@4#72iAP0E5`njxgN@xNAb-PDJ literal 0 HcmV?d00001 diff --git a/img/clean.png b/img/clean.png new file mode 100755 index 0000000000000000000000000000000000000000..af98f6164b11e235192f8d46d187ae34535b113c GIT binary patch literal 629 zcmV-*0*d{KP)U7UN)`QP)u z=bU?Grm7dV;~r*5xlx%!L|_Cf&^fD8^g{MxGtOn^M5PQOVm6+j9jh{PqNy_ULi(`| zM>BH*Dq|24&3J~nSe=<)p-Kh=ScyYZ;8esQB3keQljzFKZ&S9a7#zTI4Ag>C0fUHW z!%KX^`po=MYp;UAVJyXwdT^*>&_3fnu1{zDuLB~YDg3D6ZiZMImbxvs z0dw#O53nsWN6Wa25z&KV=)>EFiDDsM;SPos{XCB67|YDbM!_Z1tB{%drnAq=%#S#a z4#hQ$D@Ojs-@r@Rh_Qy&vVg64sG!=1mKhd)Ek0mjsh=#9?ES5autf3IeZeR$V^_&? z%4bpC0XK1?Mt`d4sx#BJDVi09dtYX=1N(6WcNK+(7F@tP%&&>>!6_{J;~bz1w-ue0 zc#LlB#PL!eLPzP}SrgliEi)Q4MThm{hNAc*xK!>%4eMKIE%k03oWl48P!8R2NRpru P00000NkvXXu0mjfigFc$ literal 0 HcmV?d00001 diff --git a/img/contribute.png b/img/contribute.png new file mode 100755 index 0000000000000000000000000000000000000000..0398b758f197589e7eedee09c77678cefc741058 GIT binary patch literal 546 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^xl_H+M9WCijSl0AZa z85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YDR+uenMVO6iP5s=4O z;1O92wCOqsGdgL^t^f+Mmw5WRvOi#vVPepp_59LnpwI_T7sn8d^R*LqdoeQ#xb}Ci zSdo*X6rs_r<0REx5_NOw2C=5O%RVqFH9b&g`6B#=<)gNX3-9e4OGKFjr!<@mo3ys? zXckAx**it&?pPmw(A6VcSMlbE#e(c-&8z=2GHSY)WE6Wj1pa(6FJklS$=OHwR27z< zlK#F}k5N;RS7@GP%B(2CfFwo@;R5I63!E#TSF<&A3FF?PmmbgZgq$HN4S|t~y z0x1R~14A=i0~1{%ix2}ND+2>76Ju>K!_p$J2}MJ0eoAIqC2kEKsn_g)8YDqB1m~xf plqVLYGL)B>>t*I;7bhncr0V4trO$q6BL!5%;OXk;vd$@?2>=?5$vgl6 literal 0 HcmV?d00001 diff --git a/img/original.png b/img/original.png new file mode 100755 index 0000000000000000000000000000000000000000..252bc0b3371388ad096067f5f595a77927317f76 GIT binary patch literal 484 zcmV?h@!H)i=8cjDS$$Ol|QdJ$@3^22jyv2Fks;a~NcXN}EG;6-9j`!katW?#>ByY9~ z_<$Foc5!lIL8@MU zQTpt6Hc~)E2RvOILp;2o6!cs<4}s7);b*H_6Fp-6V5i!UOLV%LR&wnT^vQU$MR~+$omJ}<-{JR+cWBbx+ Z`jb4O`X=6aA`bKmgQu&X%Q~loCID|{d9eTh literal 0 HcmV?d00001 diff --git a/inc/approve.php b/inc/approve.php new file mode 100755 index 0000000..2cb040f --- /dev/null +++ b/inc/approve.php @@ -0,0 +1,204 @@ +prefix . 'visitors_edits'; + $edit = $wpdb->get_row("SELECT * FROM ".$table_name." WHERE edit_id=".$_GET["edit"]); + $edit->edit_content=stripcslashes($edit->edit_content); + $edit->post=get_post($edit->post_id); + $options=get_option( "visitors_edits_options", [ + "advanced_merge"=>null + ]); + //Fix nl + //$edit->post->post_content=str_replace(["\r\n", "\r", "\n"], "
",$edit->post->post_content); + //$edit->post_content=str_replace(["\r\n", "\r", "\n"], "
",$edit->post_content); + //$edit->edit_content=str_replace(["\r\n", "\r", "\n"], "
",$edit->edit_content); + + $edit->post->post_content=nl2br($edit->post->post_content); + $edit->post_content=nl2br($edit->post_content); + $edit->edit_content=nl2br($edit->edit_content); + + if($options["advanced_merge"]!=null){ + $diff1=visitors_editsDIFF($edit->post_content,$edit->edit_content); + $conv_diff1=encodeDiff($diff1); + $diff=visitors_editsDIFF($conv_diff1["html"],$edit->post->post_content); + $diff=cleanEncodedDiff($diff); + $diff=decodeDiff($diff,$conv_diff1["codes"]); + }else{ + $diff=visitors_editsDIFF($edit->post->post_content,$edit->edit_content); + } + + $diff=cleanDiff($diff); + echo ''; + + showEditor($edit); +}else{ + noData("Select a visitor contribution"); + ?> + + "Thanks for your contribution to our blog, your contribution was reviewed and approved." + ]); + ?> +
+

Review a contribution

Delete this contribution +
    +
  • View original post
  • +
  • Author : visitor_name; ?> visitor_email; ?>
  • +
  • Submited on : + edit_time); + echo date_format($creationDate,"m/d/Y")." at ".date_format($creationDate,"h:i a"); + ?> +
  • +
  • Author comment :
  • +

    + visitor_comment); ?> +

    +
+ +
+
+
+ false, + "quicktags"=>false, + "textarea_name"=>"post_content", + "tinymce"=>[ + "mode" => "textareas", + "theme" => "modern" + ] + ]); + ?> +
+ +
+ + + + + +
+ + +
+ +
+
+ +
+ +

+ +

+ .*?#i","", $content); +} + +function addAttrTag($tag,$attr,$content){ + return preg_replace("#<".$tag."(.*?)>#i","<".$tag." ".$attr."='1'$1>", $content); +} +function clearTagName($tag,$content){ + return preg_replace("##i", "", $content); +} +function replaceTag($origin,$replace,$content){ + return preg_replace("#(<(/*)(".$origin.")(.*?)>)#i", '[$2'.$replace.'$4]', $content); +} +function encodeDiff($diff){ + //composer require paquettg/php-html-parser + require_once "parser.php"; + $html=str_get_html($diff); + $encoded=[ + "html"=>"", + "codes"=>[ + "INS"=>[], + "DEL"=>[] + ] + ]; + $id=0; + foreach($html->find('ins') as $ins){ + $encoded["codes"]["INS"][$id]=$ins->outertext; + $ins->outertext="%INS".$id."%"; + $id++; + } + $id=0; + foreach($html->find('del') as $del){ + $encoded["codes"]["DEL"][$id]=$del->outertext; + $del->outertext="%DEL".$id."%"; + $id++; + } + $encoded["html"]=$html->outertext; + return $encoded; +} +function cleanDiff($content){ + require_once "parser.php"; + $html=str_get_html($content); + foreach($html->find('ul') as $ul){ + foreach($ul->find("br") as $br){ + $br->outertext=""; + } + } + foreach($html->find('ol') as $ol){ + foreach($ol->find("br") as $br){ + $br->outertext=""; + } + } + return $html; +} +function cleanEncodedDiff($content){ + $html=str_get_html($content); + $delete_next=false; + $diffs = $html->find('ins, del'); + for ($i=0; $i < count($diffs); $i++) { + $diff=$diffs[$i]; + if($delete_next){ + $diff->outertext=""; + $delete_next=false; + coutinue; + }else{ + $isSpecial=preg_match("#%(INS|DEL)\d*?%#", $diff->innertext); + if ($isSpecial){ + //is important + if(preg_match("#diffmod#",$diff->outertext)){ + $delete_next=true; + } + $diff->outertext=$diff->innertext; + }else{ + if($diff->tag==="ins"){ + $diff->outertext=$diff->innertext; + }else{ + $diff->outertext=""; + } + } + } + } + return $html; +} +function decodeDiff($content,$codes){ + foreach ($codes["INS"] as $id => $code) { + $content=str_replace("%INS".$id."%", $code, $content); + } + foreach ($codes["DEL"] as $id => $code) { + $content=str_replace("%DEL".$id."%", $code, $content); + } + return $content; +} \ No newline at end of file diff --git a/inc/editor.php b/inc/editor.php new file mode 100755 index 0000000..ecec8f6 --- /dev/null +++ b/inc/editor.php @@ -0,0 +1,152 @@ +show_errors(); + $table_name = $wpdb->prefix . 'visitors_edits'; + + $post_id=$_POST["post_id"]; + $visitor_name=$_POST["visitor_name"]; + $visitor_email=$_POST["visitor_email"]; + $visitor_comment=$_POST["visitor_comment"]; + $edit_content=$_POST["edit_content"]; + + $post = get_post($post_id); + + //Check if changed + if(md5($post->post_content)!==md5(stripcslashes($edit_content))){ + + $wpdb->insert($table_name,[ + "edit_time"=>date('Y-m-d H:i:s'), + "visitor_name"=>$visitor_name, + "visitor_email"=>$visitor_email, + "visitor_comment"=>$visitor_comment, + "edit_content"=>$edit_content, + "post_id"=>$post_id, + "post_content"=>$post->post_content + ]); + require "mail.php"; + $options=get_option( "visitors_edits_options", [ + "admin_email"=>"", + "notify_admin"=>null, + "visitor_notif_message"=>"Your suggestion was submitted.", + "admin_notif_message"=>"A new suggestion was submitted." + ]); + $mail = [ + "post_title"=>$post->post_title, + "post_url"=>get_permalink($post_id), + "visitor_name"=>$visitor_name, + "visitor_email"=>$visitor_email, + "edit_time"=>date('H:i')." - ".date('d/m/y'), + "blog_title" => get_bloginfo("name"), + "visitor_notif_message"=>$options["visitor_notif_message"], + "admin_notif_message"=>$options["admin_notif_message"] + ]; + + $visitor_submitionMail=new visitors_edits_EMAIL($mail,"visitor_submition"); + $visitor_submitionMail->send($visitor_email); + + if($options["notify_admin"]!=null){ + $admin_email=$options["admin_email"]; + $admin_submitionMail=new visitors_edits_EMAIL($mail,"admin_submition"); + $admin_submitionMail->send($admin_email); + } + } +}else{ + global $wp; + global $post; + $post = get_posts([ + "name"=> $wp->query_vars['visitors_edits_post_name'], + 'post_type' => 'post', + 'post_status' => 'publish', + 'numberposts' => 1 + ]); + $post=$post[0]; + if($post->post_name!=$wp->query_vars['visitors_edits_post_name']){ + header("Location:".get_site_url()); + } +} +?> + + + + + + + + Submit an edit + +> + + + + +
+
Submit a contribution
+

+ Original post : post_title; ?>. +

+
+
+
+
    +
+ + + + + + + + + +
+
+ post_content,"edit_content",[ + "media_buttons"=>false, + "quicktags"=>false, + "textarea_name"=>"edit_content", + "tinymce"=>[ + "mode" => "textareas", + "theme" => "modern" + ] + ]); + _WP_Editors::enqueue_scripts(); + print_footer_scripts(); + _WP_Editors::editor_js(); + ?> +
+
+
+ + + + + \ No newline at end of file diff --git a/inc/mail.php b/inc/mail.php new file mode 100755 index 0000000..4f0459c --- /dev/null +++ b/inc/mail.php @@ -0,0 +1,48 @@ +loadTemplate($template); + $this->subject=$this->inject($template["subject"],$cpts); + $this->body=$this->inject($template["body"],$cpts); + } + public function send($destination){ + + $options=get_option( "visitors_edits_options", [ + "admin_email"=>"", + "notify_admin"=>null + ]); + + $headers= "MIME-Version: 1.0\r\n"; + $headers .= "Content-Type: text/html; charset=UTF-8\r\n"; + + wp_mail($destination, $this->subject, $this->body,$headers); + /* + subject : $this->subject + body : $this->body + */ + } + private function loadTemplate($template){ + ob_start(); + require("mail_templates/".$template.".html"); + $templateHtml=ob_get_clean(); + preg_match("|(.*)|",$templateHtml,$subject); + $templateHtml=preg_replace("|.*|","",$templateHtml); + return [ + "subject"=>$subject[1], + "body"=>$templateHtml + ]; + } + private function inject($str,$body){ + foreach ($body as $key => $value) { + $str=str_replace("#$key#",$value,$str); + } + return $str; + } + public function preview(){ + echo $this->subject; + echo $this->body; + } +} +?> \ No newline at end of file diff --git a/inc/mail_templates/admin_submition.html b/inc/mail_templates/admin_submition.html new file mode 100755 index 0000000..0dedb34 --- /dev/null +++ b/inc/mail_templates/admin_submition.html @@ -0,0 +1,89 @@ + + + + [#blog_title# | Visitors Contributions] - Contribution submited + + + + + + + + + + + +
+ + + + + + + + + + + + +
 
#blog_title#
 
Contribution submited
 
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ #admin_notif_message# +
 
+ Submition details +
 
+ #post_title# +
+ Submited on : #edit_time# +
+ Author : #visitor_name# (#visitor_email#) +
 
+ + +
 
+
 
+ Visitors Contributions +
 
+
+ + \ No newline at end of file diff --git a/inc/mail_templates/visitor_approval.html b/inc/mail_templates/visitor_approval.html new file mode 100755 index 0000000..b9f3631 --- /dev/null +++ b/inc/mail_templates/visitor_approval.html @@ -0,0 +1,84 @@ + + + + [#blog_title#] - Contribution reviewed + + + + + + + + + + + +
+ + + + + + + + + + + + +
 
#blog_title#
 
Contribution approved
 
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ Dear #visitor_name# +
 
+ #admin_message# +
 
+ #post_title# +
 
+ + +
 
+
 
+ #blog_title# team +
+ Regards +
 
+
+ + \ No newline at end of file diff --git a/inc/mail_templates/visitor_submition.html b/inc/mail_templates/visitor_submition.html new file mode 100755 index 0000000..3c0a72c --- /dev/null +++ b/inc/mail_templates/visitor_submition.html @@ -0,0 +1,95 @@ + + + + [#blog_title#] - Contribution submited + + + + + + + + + + + +
+ + + + + + + + + + + + +
 
#blog_title#
 
Contribution submited
 
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ Dear #visitor_name# +
 
+ #visitor_notif_message# +
 
+ Submition details +
 
+ #post_title# +
+ Submited on : #edit_time# +
 
+ + +
 
+
 
+ #blog_title# team +
+ Regards +
 
+
+ + \ No newline at end of file diff --git a/inc/main.php b/inc/main.php new file mode 100755 index 0000000..abefb76 --- /dev/null +++ b/inc/main.php @@ -0,0 +1,86 @@ +prefix . 'visitors_edits'; +if(isset($_GET["delete"])){ + $wpdb->delete($table_name, array( 'edit_id' => $_GET["delete"] ) ); + flashMessage("The review was deleted","danger"); +} +if(!empty($_POST)){ + wp_update_post([ + "ID"=>$_POST["ID"], + "post_content"=>$_POST["post_content"] + ]); + $wpdb->delete($table_name, array( 'edit_id' => $_POST["edit_id"] ) ); + flashMessage("The post was updated successfully",""); + //Notify visitor + if(isset($_POST["notify_visitor"])){ + require 'mail.php'; + $post = get_post($_POST["ID"]); + $mail = [ + "visitor_name"=>$_POST["visitor_name"], + "post_title"=>$post->post_title, + "post_url"=>get_permalink($_POST["ID"]), + "blog_title" => get_bloginfo("name"), + "admin_message"=>$_POST["admin_message"] + ]; + $visitor_submitionMail=new visitors_edits_EMAIL($mail,"visitor_approval"); + $visitor_submitionMail->send($_POST["visitor_email"]); + } +} +$edits = $wpdb->get_results("SELECT * FROM ".$table_name); +for ($r=0; $r post=get_post($edits[$r]->post_id); +} +?> +

> + Emty pending list +

+
> +

Pending reviews ()

+ + + + + + + + + + + + + + + + + + + + + +
PostAuthorAuthor commentDateOptions
post->post_title; ?>visitor_name?> + visitor_comment); ?> + edit_time); + echo date_format($creationDate,"m/d/Y")." at ".date_format($creationDate,"h:i a") + ?> + Review + Delete +
+
+ +
+

+ +

+
+ \ No newline at end of file diff --git a/inc/parser.php b/inc/parser.php new file mode 100755 index 0000000..67c7c9d --- /dev/null +++ b/inc/parser.php @@ -0,0 +1,1742 @@ +size is the "real" number of bytes the dom was created from. + * but for most purposes, it's a really good estimation. + * Paperg - Added the forceTagsClosed to the dom constructor. Forcing tags closed is great for malformed html, but it CAN lead to parsing errors. + * Allow the user to tell us how much they trust the html. + * Paperg add the text and plaintext to the selectors for the find syntax. plaintext implies text in the innertext of a node. text implies that the tag is a text node. + * This allows for us to find tags based on the text they contain. + * Create find_ancestor_tag to see if a tag is - at any level - inside of another specific tag. + * Paperg: added parse_charset so that we know about the character set of the source document. + * NOTE: If the user's system has a routine called get_last_retrieve_url_contents_content_type availalbe, we will assume it's returning the content-type header from the + * last transfer or curl_exec, and we will parse that and use it in preference to any other method of charset detection. + * + * Found infinite loop in the case of broken html in restore_noise. Rewrote to protect from that. + * PaperG (John Schlick) Added get_display_size for "IMG" tags. + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @author S.C. Chen + * @author John Schlick + * @author Rus Carroll + * @version 1.5 ($Rev: 210 $) + * @package PlaceLocalInclude + * @subpackage simple_html_dom + */ + +/** + * All of the Defines for the classes below. + * @author S.C. Chen + */ +define('HDOM_TYPE_ELEMENT', 1); +define('HDOM_TYPE_COMMENT', 2); +define('HDOM_TYPE_TEXT', 3); +define('HDOM_TYPE_ENDTAG', 4); +define('HDOM_TYPE_ROOT', 5); +define('HDOM_TYPE_UNKNOWN', 6); +define('HDOM_QUOTE_DOUBLE', 0); +define('HDOM_QUOTE_SINGLE', 1); +define('HDOM_QUOTE_NO', 3); +define('HDOM_INFO_BEGIN', 0); +define('HDOM_INFO_END', 1); +define('HDOM_INFO_QUOTE', 2); +define('HDOM_INFO_SPACE', 3); +define('HDOM_INFO_TEXT', 4); +define('HDOM_INFO_INNER', 5); +define('HDOM_INFO_OUTER', 6); +define('HDOM_INFO_ENDSPACE',7); +define('DEFAULT_TARGET_CHARSET', 'UTF-8'); +define('DEFAULT_BR_TEXT', "\r\n"); +define('DEFAULT_SPAN_TEXT', " "); +define('MAX_FILE_SIZE', 600000); +// helper functions +// ----------------------------------------------------------------------------- +// get html dom from file +// $maxlen is defined in the code as PHP_STREAM_COPY_ALL which is defined as -1. +function file_get_html($url, $use_include_path = false, $context=null, $offset = -1, $maxLen=-1, $lowercase = true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT) +{ + // We DO force the tags to be terminated. + $dom = new simple_html_dom(null, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText, $defaultSpanText); + // For sourceforge users: uncomment the next line and comment the retreive_url_contents line 2 lines down if it is not already done. + $contents = file_get_contents($url, $use_include_path, $context, $offset); + // Paperg - use our own mechanism for getting the contents as we want to control the timeout. + //$contents = retrieve_url_contents($url); + if (empty($contents) || strlen($contents) > MAX_FILE_SIZE) + { + return false; + } + // The second parameter can force the selectors to all be lowercase. + $dom->load($contents, $lowercase, $stripRN); + return $dom; +} + +// get html dom from string +function str_get_html($str, $lowercase=true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT) +{ + $dom = new simple_html_dom(null, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText, $defaultSpanText); + if (empty($str) || strlen($str) > MAX_FILE_SIZE) + { + $dom->clear(); + return false; + } + $dom->load($str, $lowercase, $stripRN); + return $dom; +} + +// dump html dom tree +function dump_html_tree($node, $show_attr=true, $deep=0) +{ + $node->dump($node); +} + + +/** + * simple html dom node + * PaperG - added ability for "find" routine to lowercase the value of the selector. + * PaperG - added $tag_start to track the start position of the tag in the total byte index + * + * @package PlaceLocalInclude + */ +class simple_html_dom_node +{ + public $nodetype = HDOM_TYPE_TEXT; + public $tag = 'text'; + public $attr = array(); + public $children = array(); + public $nodes = array(); + public $parent = null; + // The "info" array - see HDOM_INFO_... for what each element contains. + public $_ = array(); + public $tag_start = 0; + private $dom = null; + + function __construct($dom) + { + $this->dom = $dom; + $dom->nodes[] = $this; + } + + function __destruct() + { + $this->clear(); + } + + function __toString() + { + return $this->outertext(); + } + + // clean up memory due to php5 circular references memory leak... + function clear() + { + $this->dom = null; + $this->nodes = null; + $this->parent = null; + $this->children = null; + } + + // dump node's tree + function dump($show_attr=true, $deep=0) + { + $lead = str_repeat(' ', $deep); + + echo $lead.$this->tag; + if ($show_attr && count($this->attr)>0) + { + echo '('; + foreach ($this->attr as $k=>$v) + echo "[$k]=>\"".$this->$k.'", '; + echo ')'; + } + echo "\n"; + + if ($this->nodes) + { + foreach ($this->nodes as $c) + { + $c->dump($show_attr, $deep+1); + } + } + } + + + // Debugging function to dump a single dom node with a bunch of information about it. + function dump_node($echo=true) + { + + $string = $this->tag; + if (count($this->attr)>0) + { + $string .= '('; + foreach ($this->attr as $k=>$v) + { + $string .= "[$k]=>\"".$this->$k.'", '; + } + $string .= ')'; + } + if (count($this->_)>0) + { + $string .= ' $_ ('; + foreach ($this->_ as $k=>$v) + { + if (is_array($v)) + { + $string .= "[$k]=>("; + foreach ($v as $k2=>$v2) + { + $string .= "[$k2]=>\"".$v2.'", '; + } + $string .= ")"; + } else { + $string .= "[$k]=>\"".$v.'", '; + } + } + $string .= ")"; + } + + if (isset($this->text)) + { + $string .= " text: (" . $this->text . ")"; + } + + $string .= " HDOM_INNER_INFO: '"; + if (isset($node->_[HDOM_INFO_INNER])) + { + $string .= $node->_[HDOM_INFO_INNER] . "'"; + } + else + { + $string .= ' NULL '; + } + + $string .= " children: " . count($this->children); + $string .= " nodes: " . count($this->nodes); + $string .= " tag_start: " . $this->tag_start; + $string .= "\n"; + + if ($echo) + { + echo $string; + return; + } + else + { + return $string; + } + } + + // returns the parent of node + // If a node is passed in, it will reset the parent of the current node to that one. + function parent($parent=null) + { + // I am SURE that this doesn't work properly. + // It fails to unset the current node from it's current parents nodes or children list first. + if ($parent !== null) + { + $this->parent = $parent; + $this->parent->nodes[] = $this; + $this->parent->children[] = $this; + } + + return $this->parent; + } + + // verify that node has children + function has_child() + { + return !empty($this->children); + } + + // returns children of node + function children($idx=-1) + { + if ($idx===-1) + { + return $this->children; + } + if (isset($this->children[$idx])) + { + return $this->children[$idx]; + } + return null; + } + + // returns the first child of node + function first_child() + { + if (count($this->children)>0) + { + return $this->children[0]; + } + return null; + } + + // returns the last child of node + function last_child() + { + if (($count=count($this->children))>0) + { + return $this->children[$count-1]; + } + return null; + } + + // returns the next sibling of node + function next_sibling() + { + if ($this->parent===null) + { + return null; + } + + $idx = 0; + $count = count($this->parent->children); + while ($idx<$count && $this!==$this->parent->children[$idx]) + { + ++$idx; + } + if (++$idx>=$count) + { + return null; + } + return $this->parent->children[$idx]; + } + + // returns the previous sibling of node + function prev_sibling() + { + if ($this->parent===null) return null; + $idx = 0; + $count = count($this->parent->children); + while ($idx<$count && $this!==$this->parent->children[$idx]) + ++$idx; + if (--$idx<0) return null; + return $this->parent->children[$idx]; + } + + // function to locate a specific ancestor tag in the path to the root. + function find_ancestor_tag($tag) + { + global $debug_object; + if (is_object($debug_object)) { $debug_object->debug_log_entry(1); } + + // Start by including ourselves in the comparison. + $returnDom = $this; + + while (!is_null($returnDom)) + { + if (is_object($debug_object)) { $debug_object->debug_log(2, "Current tag is: " . $returnDom->tag); } + + if ($returnDom->tag == $tag) + { + break; + } + $returnDom = $returnDom->parent; + } + return $returnDom; + } + + // get dom node's inner html + function innertext() + { + if (isset($this->_[HDOM_INFO_INNER])) return $this->_[HDOM_INFO_INNER]; + if (isset($this->_[HDOM_INFO_TEXT])) return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]); + + $ret = ''; + foreach ($this->nodes as $n) + $ret .= $n->outertext(); + return $ret; + } + + // get dom node's outer text (with tag) + function outertext() + { + global $debug_object; + if (is_object($debug_object)) + { + $text = ''; + if ($this->tag == 'text') + { + if (!empty($this->text)) + { + $text = " with text: " . $this->text; + } + } + $debug_object->debug_log(1, 'Innertext of tag: ' . $this->tag . $text); + } + + if ($this->tag==='root') return $this->innertext(); + + // trigger callback + if ($this->dom && $this->dom->callback!==null) + { + call_user_func_array($this->dom->callback, array($this)); + } + + if (isset($this->_[HDOM_INFO_OUTER])) return $this->_[HDOM_INFO_OUTER]; + if (isset($this->_[HDOM_INFO_TEXT])) return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]); + + // render begin tag + if ($this->dom && $this->dom->nodes[$this->_[HDOM_INFO_BEGIN]]) + { + $ret = $this->dom->nodes[$this->_[HDOM_INFO_BEGIN]]->makeup(); + } else { + $ret = ""; + } + + // render inner text + if (isset($this->_[HDOM_INFO_INNER])) + { + // If it's a br tag... don't return the HDOM_INNER_INFO that we may or may not have added. + if ($this->tag != "br") + { + $ret .= $this->_[HDOM_INFO_INNER]; + } + } else { + if ($this->nodes) + { + foreach ($this->nodes as $n) + { + $ret .= $this->convert_text($n->outertext()); + } + } + } + + // render end tag + if (isset($this->_[HDOM_INFO_END]) && $this->_[HDOM_INFO_END]!=0) + $ret .= 'tag.'>'; + return $ret; + } + + // get dom node's plain text + function text() + { + if (isset($this->_[HDOM_INFO_INNER])) return $this->_[HDOM_INFO_INNER]; + switch ($this->nodetype) + { + case HDOM_TYPE_TEXT: return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]); + case HDOM_TYPE_COMMENT: return ''; + case HDOM_TYPE_UNKNOWN: return ''; + } + if (strcasecmp($this->tag, 'script')===0) return ''; + if (strcasecmp($this->tag, 'style')===0) return ''; + + $ret = ''; + // In rare cases, (always node type 1 or HDOM_TYPE_ELEMENT - observed for some span tags, and some p tags) $this->nodes is set to NULL. + // NOTE: This indicates that there is a problem where it's set to NULL without a clear happening. + // WHY is this happening? + if (!is_null($this->nodes)) + { + foreach ($this->nodes as $n) + { + $ret .= $this->convert_text($n->text()); + } + + // If this node is a span... add a space at the end of it so multiple spans don't run into each other. This is plaintext after all. + if ($this->tag == "span") + { + $ret .= $this->dom->default_span_text; + } + + + } + return $ret; + } + + function xmltext() + { + $ret = $this->innertext(); + $ret = str_ireplace('', '', $ret); + return $ret; + } + + // build node's text with tag + function makeup() + { + // text, comment, unknown + if (isset($this->_[HDOM_INFO_TEXT])) return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]); + + $ret = '<'.$this->tag; + $i = -1; + + foreach ($this->attr as $key=>$val) + { + ++$i; + + // skip removed attribute + if ($val===null || $val===false) + continue; + + $ret .= $this->_[HDOM_INFO_SPACE][$i][0]; + //no value attr: nowrap, checked selected... + if ($val===true) + $ret .= $key; + else { + switch ($this->_[HDOM_INFO_QUOTE][$i]) + { + case HDOM_QUOTE_DOUBLE: $quote = '"'; break; + case HDOM_QUOTE_SINGLE: $quote = '\''; break; + default: $quote = ''; + } + $ret .= $key.$this->_[HDOM_INFO_SPACE][$i][1].'='.$this->_[HDOM_INFO_SPACE][$i][2].$quote.$val.$quote; + } + } + $ret = $this->dom->restore_noise($ret); + return $ret . $this->_[HDOM_INFO_ENDSPACE] . '>'; + } + + // find elements by css selector + //PaperG - added ability for find to lowercase the value of the selector. + function find($selector, $idx=null, $lowercase=false) + { + $selectors = $this->parse_selector($selector); + if (($count=count($selectors))===0) return array(); + $found_keys = array(); + + // find each selector + for ($c=0; $c<$count; ++$c) + { + // The change on the below line was documented on the sourceforge code tracker id 2788009 + // used to be: if (($levle=count($selectors[0]))===0) return array(); + if (($levle=count($selectors[$c]))===0) return array(); + if (!isset($this->_[HDOM_INFO_BEGIN])) return array(); + + $head = array($this->_[HDOM_INFO_BEGIN]=>1); + + // handle descendant selectors, no recursive! + for ($l=0; $l<$levle; ++$l) + { + $ret = array(); + foreach ($head as $k=>$v) + { + $n = ($k===-1) ? $this->dom->root : $this->dom->nodes[$k]; + //PaperG - Pass this optional parameter on to the seek function. + $n->seek($selectors[$c][$l], $ret, $lowercase); + } + $head = $ret; + } + + foreach ($head as $k=>$v) + { + if (!isset($found_keys[$k])) + { + $found_keys[$k] = 1; + } + } + } + + // sort keys + ksort($found_keys); + + $found = array(); + foreach ($found_keys as $k=>$v) + $found[] = $this->dom->nodes[$k]; + + // return nth-element or array + if (is_null($idx)) return $found; + else if ($idx<0) $idx = count($found) + $idx; + return (isset($found[$idx])) ? $found[$idx] : null; + } + + // seek for given conditions + // PaperG - added parameter to allow for case insensitive testing of the value of a selector. + protected function seek($selector, &$ret, $lowercase=false) + { + global $debug_object; + if (is_object($debug_object)) { $debug_object->debug_log_entry(1); } + + list($tag, $key, $val, $exp, $no_key) = $selector; + + // xpath index + if ($tag && $key && is_numeric($key)) + { + $count = 0; + foreach ($this->children as $c) + { + if ($tag==='*' || $tag===$c->tag) { + if (++$count==$key) { + $ret[$c->_[HDOM_INFO_BEGIN]] = 1; + return; + } + } + } + return; + } + + $end = (!empty($this->_[HDOM_INFO_END])) ? $this->_[HDOM_INFO_END] : 0; + if ($end==0) { + $parent = $this->parent; + while (!isset($parent->_[HDOM_INFO_END]) && $parent!==null) { + $end -= 1; + $parent = $parent->parent; + } + $end += $parent->_[HDOM_INFO_END]; + } + + for ($i=$this->_[HDOM_INFO_BEGIN]+1; $i<$end; ++$i) { + $node = $this->dom->nodes[$i]; + + $pass = true; + + if ($tag==='*' && !$key) { + if (in_array($node, $this->children, true)) + $ret[$i] = 1; + continue; + } + + // compare tag + if ($tag && $tag!=$node->tag && $tag!=='*') {$pass=false;} + // compare key + if ($pass && $key) { + if ($no_key) { + if (isset($node->attr[$key])) $pass=false; + } else { + if (($key != "plaintext") && !isset($node->attr[$key])) $pass=false; + } + } + // compare value + if ($pass && $key && $val && $val!=='*') { + // If they have told us that this is a "plaintext" search then we want the plaintext of the node - right? + if ($key == "plaintext") { + // $node->plaintext actually returns $node->text(); + $nodeKeyValue = $node->text(); + } else { + // this is a normal search, we want the value of that attribute of the tag. + $nodeKeyValue = $node->attr[$key]; + } + if (is_object($debug_object)) {$debug_object->debug_log(2, "testing node: " . $node->tag . " for attribute: " . $key . $exp . $val . " where nodes value is: " . $nodeKeyValue);} + + //PaperG - If lowercase is set, do a case insensitive test of the value of the selector. + if ($lowercase) { + $check = $this->match($exp, strtolower($val), strtolower($nodeKeyValue)); + } else { + $check = $this->match($exp, $val, $nodeKeyValue); + } + if (is_object($debug_object)) {$debug_object->debug_log(2, "after match: " . ($check ? "true" : "false"));} + + // handle multiple class + if (!$check && strcasecmp($key, 'class')===0) { + foreach (explode(' ',$node->attr[$key]) as $k) { + // Without this, there were cases where leading, trailing, or double spaces lead to our comparing blanks - bad form. + if (!empty($k)) { + if ($lowercase) { + $check = $this->match($exp, strtolower($val), strtolower($k)); + } else { + $check = $this->match($exp, $val, $k); + } + if ($check) break; + } + } + } + if (!$check) $pass = false; + } + if ($pass) $ret[$i] = 1; + unset($node); + } + // It's passed by reference so this is actually what this function returns. + if (is_object($debug_object)) {$debug_object->debug_log(1, "EXIT - ret: ", $ret);} + } + + protected function match($exp, $pattern, $value) { + global $debug_object; + if (is_object($debug_object)) {$debug_object->debug_log_entry(1);} + + switch ($exp) { + case '=': + return ($value===$pattern); + case '!=': + return ($value!==$pattern); + case '^=': + return preg_match("/^".preg_quote($pattern,'/')."/", $value); + case '$=': + return preg_match("/".preg_quote($pattern,'/')."$/", $value); + case '*=': + if ($pattern[0]=='/') { + return preg_match($pattern, $value); + } + return preg_match("/".$pattern."/i", $value); + } + return false; + } + + protected function parse_selector($selector_string) { + global $debug_object; + if (is_object($debug_object)) {$debug_object->debug_log_entry(1);} + + // pattern of CSS selectors, modified from mootools + // Paperg: Add the colon to the attrbute, so that it properly finds like google does. + // Note: if you try to look at this attribute, yo MUST use getAttribute since $dom->x:y will fail the php syntax check. +// Notice the \[ starting the attbute? and the @? following? This implies that an attribute can begin with an @ sign that is not captured. +// This implies that an html attribute specifier may start with an @ sign that is NOT captured by the expression. +// farther study is required to determine of this should be documented or removed. +// $pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is"; + $pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-:]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is"; + preg_match_all($pattern, trim($selector_string).' ', $matches, PREG_SET_ORDER); + if (is_object($debug_object)) {$debug_object->debug_log(2, "Matches Array: ", $matches);} + + $selectors = array(); + $result = array(); + //print_r($matches); + + foreach ($matches as $m) { + $m[0] = trim($m[0]); + if ($m[0]==='' || $m[0]==='/' || $m[0]==='//') continue; + // for browser generated xpath + if ($m[1]==='tbody') continue; + + list($tag, $key, $val, $exp, $no_key) = array($m[1], null, null, '=', false); + if (!empty($m[2])) {$key='id'; $val=$m[2];} + if (!empty($m[3])) {$key='class'; $val=$m[3];} + if (!empty($m[4])) {$key=$m[4];} + if (!empty($m[5])) {$exp=$m[5];} + if (!empty($m[6])) {$val=$m[6];} + + // convert to lowercase + if ($this->dom->lowercase) {$tag=strtolower($tag); $key=strtolower($key);} + //elements that do NOT have the specified attribute + if (isset($key[0]) && $key[0]==='!') {$key=substr($key, 1); $no_key=true;} + + $result[] = array($tag, $key, $val, $exp, $no_key); + if (trim($m[7])===',') { + $selectors[] = $result; + $result = array(); + } + } + if (count($result)>0) + $selectors[] = $result; + return $selectors; + } + + function __get($name) + { + if (isset($this->attr[$name])) + { + return $this->convert_text($this->attr[$name]); + } + switch ($name) + { + case 'outertext': return $this->outertext(); + case 'innertext': return $this->innertext(); + case 'plaintext': return $this->text(); + case 'xmltext': return $this->xmltext(); + default: return array_key_exists($name, $this->attr); + } + } + + function __set($name, $value) + { + global $debug_object; + if (is_object($debug_object)) {$debug_object->debug_log_entry(1);} + + switch ($name) + { + case 'outertext': return $this->_[HDOM_INFO_OUTER] = $value; + case 'innertext': + if (isset($this->_[HDOM_INFO_TEXT])) return $this->_[HDOM_INFO_TEXT] = $value; + return $this->_[HDOM_INFO_INNER] = $value; + } + if (!isset($this->attr[$name])) + { + $this->_[HDOM_INFO_SPACE][] = array(' ', '', ''); + $this->_[HDOM_INFO_QUOTE][] = HDOM_QUOTE_DOUBLE; + } + $this->attr[$name] = $value; + } + + function __isset($name) + { + switch ($name) + { + case 'outertext': return true; + case 'innertext': return true; + case 'plaintext': return true; + } + //no value attr: nowrap, checked selected... + return (array_key_exists($name, $this->attr)) ? true : isset($this->attr[$name]); + } + + function __unset($name) { + if (isset($this->attr[$name])) + unset($this->attr[$name]); + } + + // PaperG - Function to convert the text from one character set to another if the two sets are not the same. + function convert_text($text) + { + global $debug_object; + if (is_object($debug_object)) {$debug_object->debug_log_entry(1);} + + $converted_text = $text; + + $sourceCharset = ""; + $targetCharset = ""; + + if ($this->dom) + { + $sourceCharset = strtoupper($this->dom->_charset); + $targetCharset = strtoupper($this->dom->_target_charset); + } + if (is_object($debug_object)) {$debug_object->debug_log(3, "source charset: " . $sourceCharset . " target charaset: " . $targetCharset);} + + if (!empty($sourceCharset) && !empty($targetCharset) && (strcasecmp($sourceCharset, $targetCharset) != 0)) + { + // Check if the reported encoding could have been incorrect and the text is actually already UTF-8 + if ((strcasecmp($targetCharset, 'UTF-8') == 0) && ($this->is_utf8($text))) + { + $converted_text = $text; + } + else + { + $converted_text = iconv($sourceCharset, $targetCharset, $text); + } + } + + // Lets make sure that we don't have that silly BOM issue with any of the utf-8 text we output. + if ($targetCharset == 'UTF-8') + { + if (substr($converted_text, 0, 3) == "\xef\xbb\xbf") + { + $converted_text = substr($converted_text, 3); + } + if (substr($converted_text, -3) == "\xef\xbb\xbf") + { + $converted_text = substr($converted_text, 0, -3); + } + } + + return $converted_text; + } + + /** + * Returns true if $string is valid UTF-8 and false otherwise. + * + * @param mixed $str String to be tested + * @return boolean + */ + static function is_utf8($str) + { + $c=0; $b=0; + $bits=0; + $len=strlen($str); + for($i=0; $i<$len; $i++) + { + $c=ord($str[$i]); + if($c > 128) + { + if(($c >= 254)) return false; + elseif($c >= 252) $bits=6; + elseif($c >= 248) $bits=5; + elseif($c >= 240) $bits=4; + elseif($c >= 224) $bits=3; + elseif($c >= 192) $bits=2; + else return false; + if(($i+$bits) > $len) return false; + while($bits > 1) + { + $i++; + $b=ord($str[$i]); + if($b < 128 || $b > 191) return false; + $bits--; + } + } + } + return true; + } + /* + function is_utf8($string) + { + //this is buggy + return (utf8_encode(utf8_decode($string)) == $string); + } + */ + + /** + * Function to try a few tricks to determine the displayed size of an img on the page. + * NOTE: This will ONLY work on an IMG tag. Returns FALSE on all other tag types. + * + * @author John Schlick + * @version April 19 2012 + * @return array an array containing the 'height' and 'width' of the image on the page or -1 if we can't figure it out. + */ + function get_display_size() + { + global $debug_object; + + $width = -1; + $height = -1; + + if ($this->tag !== 'img') + { + return false; + } + + // See if there is aheight or width attribute in the tag itself. + if (isset($this->attr['width'])) + { + $width = $this->attr['width']; + } + + if (isset($this->attr['height'])) + { + $height = $this->attr['height']; + } + + // Now look for an inline style. + if (isset($this->attr['style'])) + { + // Thanks to user gnarf from stackoverflow for this regular expression. + $attributes = array(); + preg_match_all("/([\w-]+)\s*:\s*([^;]+)\s*;?/", $this->attr['style'], $matches, PREG_SET_ORDER); + foreach ($matches as $match) { + $attributes[$match[1]] = $match[2]; + } + + // If there is a width in the style attributes: + if (isset($attributes['width']) && $width == -1) + { + // check that the last two characters are px (pixels) + if (strtolower(substr($attributes['width'], -2)) == 'px') + { + $proposed_width = substr($attributes['width'], 0, -2); + // Now make sure that it's an integer and not something stupid. + if (filter_var($proposed_width, FILTER_VALIDATE_INT)) + { + $width = $proposed_width; + } + } + } + + // If there is a width in the style attributes: + if (isset($attributes['height']) && $height == -1) + { + // check that the last two characters are px (pixels) + if (strtolower(substr($attributes['height'], -2)) == 'px') + { + $proposed_height = substr($attributes['height'], 0, -2); + // Now make sure that it's an integer and not something stupid. + if (filter_var($proposed_height, FILTER_VALIDATE_INT)) + { + $height = $proposed_height; + } + } + } + + } + + // Future enhancement: + // Look in the tag to see if there is a class or id specified that has a height or width attribute to it. + + // Far future enhancement + // Look at all the parent tags of this image to see if they specify a class or id that has an img selector that specifies a height or width + // Note that in this case, the class or id will have the img subselector for it to apply to the image. + + // ridiculously far future development + // If the class or id is specified in a SEPARATE css file thats not on the page, go get it and do what we were just doing for the ones on the page. + + $result = array('height' => $height, + 'width' => $width); + return $result; + } + + // camel naming conventions + function getAllAttributes() {return $this->attr;} + function getAttribute($name) {return $this->__get($name);} + function setAttribute($name, $value) {$this->__set($name, $value);} + function hasAttribute($name) {return $this->__isset($name);} + function removeAttribute($name) {$this->__set($name, null);} + function getElementById($id) {return $this->find("#$id", 0);} + function getElementsById($id, $idx=null) {return $this->find("#$id", $idx);} + function getElementByTagName($name) {return $this->find($name, 0);} + function getElementsByTagName($name, $idx=null) {return $this->find($name, $idx);} + function parentNode() {return $this->parent();} + function childNodes($idx=-1) {return $this->children($idx);} + function firstChild() {return $this->first_child();} + function lastChild() {return $this->last_child();} + function nextSibling() {return $this->next_sibling();} + function previousSibling() {return $this->prev_sibling();} + function hasChildNodes() {return $this->has_child();} + function nodeName() {return $this->tag;} + function appendChild($node) {$node->parent($this); return $node;} + +} + +/** + * simple html dom parser + * Paperg - in the find routine: allow us to specify that we want case insensitive testing of the value of the selector. + * Paperg - change $size from protected to public so we can easily access it + * Paperg - added ForceTagsClosed in the constructor which tells us whether we trust the html or not. Default is to NOT trust it. + * + * @package PlaceLocalInclude + */ +class simple_html_dom +{ + public $root = null; + public $nodes = array(); + public $callback = null; + public $lowercase = false; + // Used to keep track of how large the text was when we started. + public $original_size; + public $size; + protected $pos; + protected $doc; + protected $char; + protected $cursor; + protected $parent; + protected $noise = array(); + protected $token_blank = " \t\r\n"; + protected $token_equal = ' =/>'; + protected $token_slash = " />\r\n\t"; + protected $token_attr = ' >'; + // Note that this is referenced by a child node, and so it needs to be public for that node to see this information. + public $_charset = ''; + public $_target_charset = ''; + protected $default_br_text = ""; + public $default_span_text = ""; + + // use isset instead of in_array, performance boost about 30%... + protected $self_closing_tags = array('img'=>1, 'br'=>1, 'input'=>1, 'meta'=>1, 'link'=>1, 'hr'=>1, 'base'=>1, 'embed'=>1, 'spacer'=>1); + protected $block_tags = array('root'=>1, 'body'=>1, 'form'=>1, 'div'=>1, 'span'=>1, 'table'=>1); + // Known sourceforge issue #2977341 + // B tags that are not closed cause us to return everything to the end of the document. + protected $optional_closing_tags = array( + 'tr'=>array('tr'=>1, 'td'=>1, 'th'=>1), + 'th'=>array('th'=>1), + 'td'=>array('td'=>1), + 'li'=>array('li'=>1), + 'dt'=>array('dt'=>1, 'dd'=>1), + 'dd'=>array('dd'=>1, 'dt'=>1), + 'dl'=>array('dd'=>1, 'dt'=>1), + 'p'=>array('p'=>1), + 'nobr'=>array('nobr'=>1), + 'b'=>array('b'=>1), + 'option'=>array('option'=>1), + ); + + function __construct($str=null, $lowercase=true, $forceTagsClosed=true, $target_charset=DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT) + { + if ($str) + { + if (preg_match("/^http:\/\//i",$str) || is_file($str)) + { + $this->load_file($str); + } + else + { + $this->load($str, $lowercase, $stripRN, $defaultBRText, $defaultSpanText); + } + } + // Forcing tags to be closed implies that we don't trust the html, but it can lead to parsing errors if we SHOULD trust the html. + if (!$forceTagsClosed) { + $this->optional_closing_array=array(); + } + $this->_target_charset = $target_charset; + } + + function __destruct() + { + $this->clear(); + } + + // load html from string + function load($str, $lowercase=true, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT) + { + global $debug_object; + + // prepare + $this->prepare($str, $lowercase, $stripRN, $defaultBRText, $defaultSpanText); + // strip out cdata + $this->remove_noise("''is", true); + // strip out comments + $this->remove_noise("''is"); + // Per sourceforge http://sourceforge.net/tracker/?func=detail&aid=2949097&group_id=218559&atid=1044037 + // Script tags removal now preceeds style tag removal. + // strip out + + + + + + + + + + + + + + + + + + diff --git a/vendor/caxy/php-htmldiff/demo/demo.module.js b/vendor/caxy/php-htmldiff/demo/demo.module.js new file mode 100755 index 0000000..c899d42 --- /dev/null +++ b/vendor/caxy/php-htmldiff/demo/demo.module.js @@ -0,0 +1,9 @@ +(function() { + 'use strict'; + + angular.module('demo', [ + 'ngSanitize', + 'ngCkeditor', + 'ui.bootstrap' + ]); +})(); diff --git a/vendor/caxy/php-htmldiff/demo/demos.json b/vendor/caxy/php-htmldiff/demo/demos.json new file mode 100755 index 0000000..423b2a2 --- /dev/null +++ b/vendor/caxy/php-htmldiff/demo/demos.json @@ -0,0 +1 @@ +[{"name":"Demo 1","old":"

The required capacity of each door opening shall be sufficient for the occupant load<\/em> thereof and shall provide a minimum clear width of 32 inches (813 mm). Clear openings of doorways with swinging doors shall be measured between the face of the door and the stop, with the door open 90 degrees (1.57 rad). Where this section requires a minimum clear width of 32 inches (813 mm) and a door opening includes two door leaves without a mullion, one leaf shall provide a clear opening width of 32 inches (813 mm). The maximum width of a swinging door leaf shall be 48 inches (1219 mm) nominal. Means of egress<\/em> doors in a Group I-2 occupancy used for the movement of beds shall provide a clear width not less than 411<\/sup>\/ 2 <\/sub><\/sub> inches (1054 mm). The height of door openings shall be not less than 80 inches (2032 mm).<\/p>