Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
FileImporterUtils
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 addTargetBlankToLinks
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
<?php
namespace FileImporter;
/**
 * @license GPL-2.0-or-later
 */
class FileImporterUtils {
    /**
     * @param string $html
     *
     * @return string
     */
    public static function addTargetBlankToLinks( string $html ) : string {
        return preg_replace( '/<a\b(?![^<>]*\starget=)/', '<a target="_blank"', $html );
    }
}