wibble | Experiment for : Zend Framework HTML Sanitiser/Manipulator

 by   padraic PHP Version: Current License: Non-SPDX

kandi X-RAY | wibble Summary

kandi X-RAY | wibble Summary

wibble is a PHP library. wibble has no bugs, it has no vulnerabilities and it has low support. However wibble has a Non-SPDX License. You can download it from GitHub.

Wibble will be a filter based HTML/XML sanitizer and manipulator which traverses all nodes of a source DOM to apply arbitrary filtering rules. Wibble can selectively update source HTML or XML and export a well-formed document or fragment containing the results of its filtering. The uses for Wibble vary, however it’s primarily targeted at applying changes to nodes of a document’s DOM based on some nodal condition (e.g. a tagname or xpath expression or attribute value). This is useful, for example, in stripping source markup of illegal tags and attributes or replacing/modifying specific nodes. The filter logic utilised can be of any complexity. For example, you may determine that all attributes in an HTML document called "style" should be removed. Wibble allows you to define a filter to accomplish this, which can then traverse the source’s DOM applying the filter to all nodes within the document’s DOM. At each node, the filter could assess if that node is an element with the style attribute, and delete the attribute if present. (Note: Wibble would have a built in strip tags filter.). The background of writing Wibble was the problem of sanitizing untrusted HTML so it is safe for output to browsers (without substantial alteration or the application of a native PHP escape mechanism) in an efficient performant manner. A common use case for this are user comments on a blog where a subset of HTML is allowable. Often, this leads to the adoption of markup languages like BBCode or Markdown instead of worrying about HTML trust and safety. The domain of sanitizing HTML is not, however, always that simple to avoid. RSS or Atom feeds also carry HTML content intended for output, and the source of such feeds (like any input) can be untrustworthy, i.e. we must filter/validate the input markup prior to output. The fallback to an alternative markup language is not possible in this case, and so, a HTML sanitizer/manipulator comes in handy. Also, markup language fallbacks are themselves subject to security issues if not properly written/maintained.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              wibble has a low active ecosystem.
              It has 37 star(s) with 4 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 5 open issues and 0 have been closed. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of wibble is current.

            kandi-Quality Quality

              wibble has 0 bugs and 0 code smells.

            kandi-Security Security

              wibble has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              wibble code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              wibble has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              wibble releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.
              wibble saves you 1321 person hours of effort in developing the same functionality from scratch.
              It has 2963 lines of code, 135 functions and 26 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed wibble and discovered the below as its top functions. This is intended to give you an instant insight into wibble implemented functionality, and help decide if they suit your requirements.
            • Sanitize attributes .
            • Convert a DOMNode to a string .
            • Sanitize a DOMNode
            • Apply tidy .
            • Convert DOM to string
            • Load a class .
            • Returns the inner html of a node
            • Convert string from UTF - 8 to UTF - 8
            • Register the SPL autoloader .
            Get all kandi verified functions for this library.

            wibble Key Features

            No Key Features are available at this moment for wibble.

            wibble Examples and Code Snippets

            No Code Snippets are available at this moment for wibble.

            Community Discussions

            QUESTION

            Pre ES6 Static Functions in a Class
            Asked 2021-May-22 at 16:49

            My Question, see below, is how to declare STATIC functions and constants of a pre-ES6 class so they can be inherited?

            A recap of the present ES6 class and pre-ES6 classes are given prior to the question so we are all using the same conventions.

            In post ES6 we can define a static function in a class as follows:

            ...

            ANSWER

            Answered 2021-May-22 at 16:48

            How do I create static functions which can be called without an instance, and how do I assign static constants which can be accessed without an instance?

            Both methods and constants are just properties of the class (constructor function) object, and are created by assignment:

            Source https://stackoverflow.com/questions/67648500

            QUESTION

            Trying to create a google script to generate a floating button for New Sites
            Asked 2020-Nov-06 at 17:30

            I'm trying to create a floating button to a charity website, encouraging people to 'donate'. The idea is the button remains visible at all times, on all pages, when you scroll down. I've created a button that works using the w3schools tool, but cannot get it work on New Google Sites (which is what the site is built in). If I embed it, it puts the button in an iFrame, not on the main site. I was hoping that creating a google Script would allow me to add it, but don't know where to start in converting the current code to a google script. Any advice very gratefully received!

            ...

            ANSWER

            Answered 2020-Nov-06 at 17:30

            At this time it's possible to embed a Google Apps Script web app into a new Google Sites web page but that's all that can be done.

            In other words, what you are trying to do, can't be done on new Google Sites.

            Source https://stackoverflow.com/questions/64718091

            QUESTION

            Exclude from output if column has any entry other than xyz
            Asked 2020-Oct-26 at 09:22

            I'm trying to output rows where Zipcodes have entries of ONLY category a - e.g. on the table below:

            ...

            ANSWER

            Answered 2020-Oct-23 at 15:35

            QUESTION

            TypeScript: Is it possible to safely access nested properties of an object given an array of keys? Can this be done in a type safe and composable way?
            Asked 2020-Aug-31 at 14:40

            I'd like to write a function which gets a value from an object given an array of property keys. It would look something like this:

            ...

            ANSWER

            Answered 2020-Aug-31 at 14:40

            This is getting close to the limits of what I can get out of the type system. TypeScript 4.1 will support recursive conditional types, but even with them I imagine you'll quite possibly get circularity errors, "type instantiation too deep" errors, or other weird errors on anything that tries to use getValue() generically. So I'm not sure I'd actually recommend you use what I'm going to write below:

            In another question I wrote how to convince the compiler to give you a union of all the valid key paths of an object, represented as a tuple. It looks like this:

            Source https://stackoverflow.com/questions/63650858

            QUESTION

            Variable does not need to be mutable, but it does
            Asked 2020-Aug-29 at 13:26

            I have a macro which works:

            ...

            ANSWER

            Answered 2020-Aug-29 at 05:28

            Fixed by adding a special case for the empty invocation:

            Source https://stackoverflow.com/questions/63643732

            QUESTION

            Are there differences between using ref in a match and ampersanding a non-reffed match?
            Asked 2020-Aug-29 at 05:00

            Are these two match branches equivalent?

            ...

            ANSWER

            Answered 2020-Aug-28 at 08:27

            They do make a difference when we're matching value instead of reference. Consider the example:

            Source https://stackoverflow.com/questions/63628313

            QUESTION

            WebApi2 Controller Post method always receiving null FromBody
            Asked 2020-Jul-15 at 07:21

            I'm having issues with the [FromBody] in my POST method always being null.

            I've reproduced it using a minimal app in VS2019:

            • Create project ASP.NET Web Application (.NET Framework)
            • Select Web API

            This creates a skeleton project with a ValuesController class with the following method:

            ...

            ANSWER

            Answered 2020-Jul-15 at 07:21

            Changing the generated code from:

            Source https://stackoverflow.com/questions/62856066

            QUESTION

            How to set scope for AngularJS component
            Asked 2020-May-25 at 00:09

            Suppose I build an AngularJS component

            ...

            ANSWER

            Answered 2020-May-25 at 00:09

            You just plain cannot do this for a component. Refactor it as a directive and provide a link function that supplies the directive scope to the transclude function.

            Source https://stackoverflow.com/questions/61824259

            QUESTION

            in bash, create json object of key=filename and value=file-contents given sequence of pathed filenames on stdin
            Asked 2020-May-15 at 07:01

            For example, if the list of the filenames on stdin is /etc/alpha.txt and /tmp/beta.txt

            And /etc/alpha.txt contains wibble

            And /tmp/beta.txt contains fu\nbar

            Then what I'd like to generate is

            {"/etc/alpha.txt":"wibble","/tmp/beta.txt":"fu\nbar"}

            I don't have access to any programming languages. This is on a Linux OS. I can install utilities like jq.

            The solution from Léa Gris looks spot on. Thank you Léa. Alas my question has been closed as not being focused enough. Sorry about that. This is only my second question on StackOverflow! I'm struggling to make it more focused. This really is my exact issue. I'm trying to make the core runner service in https://cyber-dojo.org a little faster.

            My attempts had got stuck at what to put before the jq -s add.

            ...

            ANSWER

            Answered 2020-May-14 at 21:36

            Here's one option that assumes both jq and a bash or bash-like shell:

            Source https://stackoverflow.com/questions/61807377

            QUESTION

            Unable to parse XML using XElement
            Asked 2020-Jan-31 at 15:33

            Baffled as to how hard this is turning out to be.

            I have some xml like this:

            ...

            ANSWER

            Answered 2020-Jan-31 at 15:33

            If I do Descendants("Cat") I get null.

            Because you forgot about your xml namespace xmlns="https://www.example.com"

            Correct way is:

            Source https://stackoverflow.com/questions/60006863

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install wibble

            You can download it from GitHub.
            PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/padraic/wibble.git

          • CLI

            gh repo clone padraic/wibble

          • sshUrl

            git@github.com:padraic/wibble.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link