| 1: | <?php |
| 2: | /** |
| 3: | * TextSanitizer extension |
| 4: | * |
| 5: | * You may not change or alter any portion of this comment or credits |
| 6: | * of supporting developers from this source code or any supporting source code |
| 7: | * which is considered copyrighted (c) material of the original comment or credit authors. |
| 8: | * This program is distributed in the hope that it will be useful, |
| 9: | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10: | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 11: | * |
| 12: | * @copyright (c) 2000-2016 XOOPS Project (www.xoops.org) |
| 13: | * @license GNU GPL 2 (https://www.gnu.org/licenses/gpl-2.0.html) |
| 14: | * @package class |
| 15: | * @subpackage textsanitizer |
| 16: | * @since 2.3.0 |
| 17: | * @author Wishcraft <simon@xoops.org> |
| 18: | * @deprecated |
| 19: | */ |
| 20: | defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
| 21: | |
| 22: | /** |
| 23: | * Class MytsLi |
| 24: | */ |
| 25: | class MytsLi extends MyTextSanitizerExtension |
| 26: | { |
| 27: | /** |
| 28: | * @param MyTextSanitizer $myts |
| 29: | * |
| 30: | * @return bool |
| 31: | */ |
| 32: | public function load(MyTextSanitizer $myts) |
| 33: | { |
| 34: | $myts->patterns[] = "/\[li](.*)\[\/li\]/sU"; |
| 35: | $myts->replacements[] = '<li>\\1</li>'; |
| 36: | |
| 37: | return true; |
| 38: | } |
| 39: | } |
| 40: |