メイン | 簡易ヘッドライン |
MyTextSanitizer has become Xoops\Core\Text\Sanitizer.
Highlights:
- Single unified configuration file
xoops_data / configs / system_sanitizer_prefs . yml
- Extensions (i.e. YouTube) are now a SanitizerComponent, a base class that also includes Filters (i.e. Xss)
- Each SanitizerComponent auto-configures, and configuration is automatically updated with new additions
- Custom components can be added via response to core.sanitizer.configuration.defaults event
- ShortCodes (WordPress style) are now the basis of XoopsCode and extensions
- Custom ShortCodes can be added via response to
event, or by directly accessing the ShortCodes engine withcore . sanitizer . shortcodes . add
Sanitizer :: getShortCodes ()
- All built-in components and shortcodes can be overridden with same named custom replacements
- Some extensions have updated syntax. For example:
[ youtube = 640 , 385 ] https : //www.youtube.com/watch?v=JxS5E-kZc2s[/youtube]
can now be:
[ youtube url = "JxS5E-kZc2s" width = "640" height = "385" /]
(It also can use virtually any known YouTube URL as the url attribute.)
- Another example is SoundCloud, which now can directly support the "Wordpress code" option offered in the Share/Embed dialog on soundcloud.com.
The old styles are still accepted for compatibility with existing content, and not all extensions have conversions to new styles, yet. There is more work to be done, but the backing code is now in place.