-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shortcodes not replaced in FulltextSearch results #1751
Comments
@g4b0 hmm, should they be? I have shortcodes to embed YouTube videos, add Google Maps and so on. This kind of media I wouldn't want to show in search results... Perhaps you should override this on a per site basis? However, if the ShortCodes still show (aren't stripped out) that is indeed a bug - and one that needs to be decided on how it's fixed (ie: Remove or parse) |
Its use case dependent, but removing them would be a good default. |
I suspect the results are either not being cast as HTMLText, or aren't valid HTML. If it's the second, you should be able to set ShortcodeParser::$error_behavior to ShortcodeParser::STRIP to have it remove invalid shortcodes, but currently it won't work properly if the HTML can't even be parsed. |
I tryied with ShortcodeParser::$error_behavior setted to ShortcodeParser::STRIP, but it does not strip external links: STRIP:Benvenuto in SilverStripe! Questa è l'homepage di default. Puoi modificare questa pagina aprendo il CMS. Puoi visualizzare adesso la documentazione di sviluppo[http://doc.silverstripe.com], o iniziaren i tutorial.[http://doc.silverstripe.com/doku.php?id=tutorials] LEAVE:Benvenuto in SilverStripe! Questa è l'homepage di default. Puoi modificare questa pagina aprendo il CMS[admin/]. Puoi visualizzare adesso la documentazione di sviluppo[http://doc.silverstripe.com], o iniziaren i tutorial.[http://doc.silverstripe.com/doku.php?id=tutorials] only [admin/] was stripped form my test search |
Fixes silverstripe#2929 Fixes silverstripe#1381 Fixes silverstripe#5547 Fixes silverstripe#1751
Fixes silverstripe#2929 Fixes silverstripe#1381 Fixes silverstripe#5547 Fixes silverstripe#1751
Cleanup DBField subclasses Fixes silverstripe#2929 Fixes silverstripe#1381 Fixes silverstripe#5547 Fixes silverstripe#1751
Cleanup DBField subclasses Fixes silverstripe#2929 Fixes silverstripe#1381 Fixes silverstripe#5547 Fixes silverstripe#1751
Cleanup DBField subclasses Fixes silverstripe#2929 Fixes silverstripe#1381 Fixes silverstripe#5547 Fixes silverstripe#1751
Cleanup DBField subclasses Fixes silverstripe#2929 Fixes silverstripe#1381 Fixes silverstripe#5547 Fixes silverstripe#1751
Fixed with #5653 :D |
As in subject, search results output is served without replacing shortcodes with corresponding URL (SS 3.1.0-beta2 git pulled right now)
The text was updated successfully, but these errors were encountered: