Replace <iframe> with standard text
Content is expected to be rendered, e.g. after the_content filters have been run
Hooked into `the_content` filter

@param string $content

@return string
500151
public function replaceIframes( $content ) {
		// Check for iframe HTML code, bail if there isn't any
		if ( stripos( $content, '<iframe' ) === false ) {
			return $content;
		}

		global $id; // This is the Post ID, [@see WP_Query::setup_postdata, ...]

		$html5 = new HtmlParser();
		$dom = $html5->loadHTML( $content );

		$html = $this->blade->render(
			'interactive.shared', [
				'title' => $this->getTitle( $id ),
				'url' => wp_get_shortlink( $id ),
			]
		);
		$fragment = $html5->parser->loadHTMLFragment( $html );

		$elements = $dom->getElementsByTagName( 'iframe' );
		for ( $i = $elements->length; --$i >= 0; ) {  // If you're deleting elements from within a loop, you need to loop backwards
			$iframe = $elements->item( $i );
			$iframe->parentNode->replaceChild( $dom->importNode( $fragment, true ), $iframe );
		}

		$s = $html5->saveHTML( $dom );
		return $s;
	}
909922
public function generateSearchText($content)
    {
        $content = $this->_defaultData($content);
        $content['link'] = str_replace('internal://', '', $content['link'], $count);
        if ($count > 0) {
            $paths = Path::getById($content['link']);
            $content['link'] = $paths->exists ? $paths->name : '';
        }
        return parent::generateSearchText($content['link']);
    }
1254407
protected function formatContent($content)
    {
        $searches = array(
            '{{filename}}',
            '{{namespace}}',
            '{{className}}',
        );

        $replaces = array(
            $this->data['filename'],
            $this->data['namespace'],
            $this->data['className'],
        );

        return str_replace($searches, $replaces, $content);
    }
13362
protected function _censor($content) {
        $pattern = implode('|', array_map(array($this, '_prepareRegex'), $this->getBlacklist()));
        $content = preg_replace_callback('/(?:^|\b)(?:' . $pattern . ')(?:\b|$)/is', array($this, '_censorCallback'), $content);

        return $content;
    }
1180348
public static function escapeAndMarkdownLight(?string $content): string
    {
        return $content ? C::getMarkdown()->textLight(Html::escape($content)) : (string) $content;
    }
176881
public static function cleanImageContent($content) {
		$posImg = strpos($content, '<img');
		
		$result = $content;
		if($posImg !== false) {
			$posClosedImg = strpos($content, '/>', $posImg) + 2;
			$img = substr($content, $posImg, ($posClosedImg-$posImg));

			$result = str_replace($img, '', $content);
		}
		return $result;	
	}
41603
protected function getHtml( $content )
	{
		$site = Route::input( 'site', Input::get( 'site', 'default' ) );
		return View::make( 'shop::jqadm.index', array( 'content' => $content, 'site' => $site ) );
	}
1143094
public static function markdown(&$content)
    {
        if (self::$MarkdownParser === null) {
            if (class_exists('dflydev\markdown\MarkdownParser')) {
                self::$MarkdownParser = new \dflydev\markdown\MarkdownParser;
            } else {
                self::$MarkdownParser = false;
            }
        }

        if (self::$MarkdownParser !== false) {
            $content = trim(self::$MarkdownParser->transformMarkdown($content));
        }

        return $content;
    }
519785
protected function processUrlTag(string &$content): void
    {
        $pattern = $this->getTagPattern('url(\s+(.+?))?' . preg_quote($this->endTag, '/') . '(.+?)' . preg_quote($this->startTag . '/url', '/'));
        $content = preg_replace_callback($pattern, function ($match) {
            $matchName = $match[2];
            $matchPath = $match[3];
            $urlAsset = Application::$app->getService('urlAsset');
            if ($matchName == '') {
                return $urlAsset->getUrl($matchPath);
            } else {
                return $urlAsset->getUrl($matchPath, $matchName);
            }
        }, $content);
    }
1294633
public static function get_content_value($content) {
        $arr = explode('##', $content->content);

        $strvalue = '';
        foreach ($arr as $a) {
            $strvalue .= $a . ' ';
        }

        return trim($strvalue, "\r\n ");
    }
799878
private function replaceControllerName($content)
    {
        $content = str_replace('{%ControllerClassName%}', $this->controller, $content);
        $content = str_replace('%ControllerName%', $this->controller, $content);
        $content = str_replace('%controllerName%', Inflector::deCamelize($this->controller), $content);

        return $content;
    }
493396
public function prepareContent($content)
    {
        $cto = $this->getContentTypeObject();
        if (!empty($cto)) {
            return $cto->prepareContent($content);
        } else {
            return (string) $content;
        }
    }
495890
public function transform($content)
    {
        if (null === $content) {
            return null;
        }

        if (!is_string($content)) {
            throw new TransformationFailedException(sprintf(
                'Expected string, %s given',
                gettype($content)
            ));
        }

        //replace comments with span so that we can add a nice style to the commented section
        $content = StripTagsUtil::replaceCommentWith($content, StripTagsUtil::SPAN_REPLACEMENT);

        return $content;
    }
1234063
public function renderContainer($content = null)
    {
        if ($this->UseContainer) {
            
            return sprintf(
                "<div class=\"%s\">\n<div class=\"%s\">\n%s</div>\n</div>\n",
                $this->getContainerClass(),
                $this->getHTMLClass(),
                $content
            );
            
        }
        
        return $content;
    }
1205005
protected function _replaceCdata($content) {
		foreach ($this->_cdata as $n => $data) {
			$data = '<![CDATA[' . $data . ']]>';
			$content = str_replace('###CDATA-' . $n . '###', $data, $content);
		}
		return $content;
	}
626193
public function prepareContent($content)
    {
        if (is_array($content)) {
            $ctt = '';
            foreach ($content as $key=>$ctt) {
                $content .= $ctt;
            }
            $content = $ctt;
        }
        $_escaped_output = strip_tags((string) $content);
        if ($_escaped_output != (string) $content) {
            if (preg_match('/(.*)<body(.*)</body>/i', (string) $content, $matches)) {
                $_output = $matches[0];
            } else {
                $_output = (string) $content;
            }
            $content = Html2Text::convert($_output);
        }
        return (string) $content;
    }
812389
public static function entitiesToUnicode($content)
    {
        /* Convert HTML entities to uppercase hexadecimal */
        $content = preg_replace_callback('/\&\#(x?[a-zA-Z0-9]*?)\;/', function($matches) {
            $code = $matches[1];

            if ($code[0] == 'x') {
                return '&#x' . strtoupper(substr($code, 1)) . ';';
            }

            return '&#x' . strtoupper(dechex($code)) . ';';
        }, $content);

        $replacements = self::getEntityCodepoints();
        return str_replace(array_keys($replacements), $replacements, $content);
    }