Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 114... Línea 114...
114
            $filtermanager->setup_page_for_filters($PAGE, $context); // Setup global stuff filters may have.
114
            $filtermanager->setup_page_for_filters($PAGE, $context); // Setup global stuff filters may have.
115
            $string = $filtermanager->filter_string($string, $context);
115
            $string = $filtermanager->filter_string($string, $context);
116
        }
116
        }
Línea 117... Línea 117...
117
 
117
 
118
        // If the site requires it, strip ALL tags from this string.
118
        // If the site requires it, strip ALL tags from this string.
119
        if (!empty($this->get_striptags())) {
119
        if ($this->get_striptags()) {
120
            if ($escape) {
120
            if ($escape) {
121
                $string = str_replace(['<', '>'], ['&lt;', '&gt;'], strip_tags($string));
121
                $string = str_replace(['<', '>'], ['&lt;', '&gt;'], strip_tags($string));
122
            } else {
122
            } else {
123
                $string = strip_tags($string);
123
                $string = strip_tags($string);
Línea 275... Línea 275...
275
                }
275
                }
276
                $filteroptions['stage'] = 'post_clean';
276
                $filteroptions['stage'] = 'post_clean';
277
                $text = $filtermanager->filter_text($text, $context, $filteroptions);
277
                $text = $filtermanager->filter_text($text, $context, $filteroptions);
278
                break;
278
                break;
279
            default:  // FORMAT_MOODLE or anything else.
279
            default:  // FORMAT_MOODLE or anything else.
280
                throw new \coding_exception("Unkown format passed to format_text: {$format}");
280
                throw new \coding_exception("Unknown format passed to format_text: {$format}");
281
        }
281
        }
Línea 282... Línea 282...
282
 
282
 
283
        if ($filter) {
283
        if ($filter) {
284
            // At this point there should not be any draftfile links any more,
284
            // At this point there should not be any draftfile links any more,
Línea 385... Línea 385...
385
 
385
 
386
        if (isset($this->striptags)) {
386
        if (isset($this->striptags)) {
387
            return $this->striptags;
387
            return $this->striptags;
Línea 388... Línea 388...
388
        }
388
        }
389
 
389
 
Línea 390... Línea 390...
390
        return $CFG->formatstringstriptags;
390
        return !empty($CFG->formatstringstriptags);
391
    }
391
    }
392
 
392