Giter Site home page Giter Site logo

alfredoramos / parsedown-extra-laravel Goto Github PK

View Code? Open in Web Editor NEW
26.0 4.0 0.0 186 KB

A Parsedown Extra package for Laravel and Lumen

License: GNU General Public License v3.0

PHP 100.00%
markdown markdown-extra parsedown parsedown-extra laravel lumen

parsedown-extra-laravel's People

Contributors

alfredoramos avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

parsedown-extra-laravel's Issues

Laravel 5.6

Adjust composer.json to include Laravel 5.6

Purifier doesn't work

$dirty_html = Markdown::parse('[test](http://vien.tech) http://vien.tech', ['config' => [
            'URI.Host' => 'localhost',
            'URI.DisableExternal' => true,
            'HTML.Nofollow' => true
        ]]);

or

$dirty_html = Markdown::parse('[test](http://vien.tech) http://vien.tech', ['config' => 'default]);

and the default config includes 'HTML.Nofollow' => true,

the output html without rel=nofollow, but when I used HTMLPurifier directly, it worked.

like this:

<p><a href="http://vien.tech">jj</a> <a href="http://vien.tech">http://vien.tech</a></p>
        $config = HTMLPurifier_Config::createDefault();
        $config->set('HTML.Nofollow', 'true');

        $purifier = new HTMLPurifier($config);
        $clean_html = $purifier->purify($dirty_html);

        dump($clean_html);

output:

<p><a href="http://vien.tech" rel="nofollow">jj</a> <a href="http://vien.tech" rel="nofollow">http://vien.tech</a></p>

what's the problem?

Emojis inside code tags

Currently there's an issue with the emojis (if enabled) inside code/textarea tags as it shows them as its markdown syntax replacement for images.

I'm trying to fix this as soon as possible, however if someone wants to help I'd appreciate it.

How do you completely disable HTML Purifier?

I don't want to run the HTML through Purifier, so I tried to disable it via the config, but no luck:

        $html = markdown($doc->body(),
            [
            'purifier' => [
                'enabled' => false
                ]
            ]
        );

What's the correct way to do this?

The Markdown::parse() method is announced as deprecated

The Markdown::parse() method is announced as deprecated.
We find the following information into the PHPdoc :

@deprecated Function overloaded to maintain compatibility.

Which other method should we use to avoid problems in the future versions ?

Don't use t.co in HostBlackList

As HTML Purifier's HostBlacklist only manages to check the presence of each string on the current domain name, the use of t.co in the filters list leads to too many false positives, since it will match every .com (or .co.uk and so on) ending by a single "t".

At least, t.co should be removed from config/parsedown.php

I'm getting this while composer update/install

Class ParsedownExtraTest located in C:/Users/Yo/Desktop/secretproject/vendor/erusev/parsedown-extra\test\ParsedownExtraTest.php does not comply with psr-0 autoloading standard. Skipping.

Any Ideas, how to fix it?

setBreaksEnabled in the config file

Is it possible to set the setBreaksEnabled option somewhere globally? I tried putting this to the parsedownextra.php file but that didn't work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.