Code Duplication    Length = 20-21 lines in 2 locations

lib/ar/content/html.php 1 location

@@ 383-402 (lines=20) @@
380
			return $result;
381
		}
382
383
		public static function stripARNameSpace($html) {
384
			$context = pobject::getContext();
385
			$me = $context["arCurrentObject"];
386
			include_once($me->store->get_config('code')."modules/mod_htmlcleaner.php");
387
			$cleanAR = array(
388
				'rewrite' => array(
389
					'^(A|IMG|DIV)$' => array(
390
						'^ar:.*' => false,
391
						'^arargs:.*' => false,
392
						'^class' => array(
393
							'htmlblock[ ]*uneditable[ ]*' => false
394
						)
395
					)
396
				),
397
				'delete_emptied' => array(
398
					'div', 'a'
399
				)
400
			);
401
			return new ar_content_htmlContent( htmlcleaner::cleanup( $html, $cleanAR ) );
402
		}
403
404
		private static function pregError( $errno ) {
405
			switch($errno) {

lib/modules/mod_page.php 1 location

@@ 248-268 (lines=21) @@
245
		return $result;
246
	}
247
248
	public static function stripARNameSpace($page) {
249
		$context = pobject::getContext();
250
		$me = $context["arCurrentObject"];
251
		include_once($me->store->get_config('code')."modules/mod_htmlcleaner.php");
252
		$cleanAR = array(
253
			'rewrite' => array(
254
				'^(A|IMG|DIV)$' => array(
255
					'^ar:.*' => false,
256
					'^arargs:.*' => false,
257
					'^class' => array(
258
						'htmlblock[ ]*uneditable[ ]*' => false
259
					),
260
					'^data-vedor-*' => false
261
				)
262
			),
263
			'delete_emptied' => array(
264
				'div', 'a'
265
			)
266
		);
267
		return htmlcleaner::cleanup( $page, $cleanAR );
268
	}
269
270
}
271