JFilterOutput/linkXHTMLSafe
From Joomla! Documentation
< API16:JFilterOutput
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
This method processes a string and replaces all instances of & with & in links only
Template:Description:JFilterOutput/linkXHTMLSafe
Syntax[edit]
linkXHTMLSafe($input)
Parameter Name | Default Value | Description |
---|---|---|
$input | $input String to process |
Returns[edit]
string Processed string
Defined in[edit]
libraries/joomla/filter/filteroutput.php
Importing[edit]
jimport( 'joomla.filter.filteroutput' );
Source Body[edit]
function linkXHTMLSafe($input)
{
$regex = 'href="([^"]*(&(amp;){0})[^"]*)*?"';
return preg_replace_callback("#$regex#i", array('JFilterOutput', '_ampReplaceCallback'), $input);
}
[Edit See Also] Template:SeeAlso:JFilterOutput/linkXHTMLSafe
Examples[edit]
<CodeExamplesForm />