thunderer / Shortcode

Advanced shortcode (BBCode) parser and engine for PHP
http://kowalczyk.cc
MIT License
378 stars 29 forks source link

facade process not working #69

Closed hanachan1026 closed 6 years ago

hanachan1026 commented 6 years ago

Using Laravel 5.4

public function getContentAttribute()
{
        $facade = new ShortCodeFacade();
        $facade->addHandler('hello', function (ShortcodeInterface $s) {
            return sprintf('%s', $s->getParameter('alt_text'));
        });

        return $facade->process($this->post_content);
}
$this->post_content
// [img alt_text='' description='']https://noschool.xsrv.jp/wp/wp-content/uploads/2018/06/Simulator-Screen-Shot-iPhone-X-2018-06-08-at-21.40.37.png[/img]

It doesnt escape shortcodes, and cannot get parameter.

thunderer commented 6 years ago

@hanachan1026 you closed this issue shortly after opening it. Did you solve your problem? Can I help you with something?

hanachan1026 commented 6 years ago

@thunderer Sorry I should've deleted this issue because I found out how to use this func shortly after I posted this. Thank you

thunderer commented 6 years ago

I understand - if you have any other question feel free to open an issue here or send me an email, you'll find it on my website: https://kowalczyk.cc . Thanks for using my library!