API16

JFilterOutput/linkXHTMLSafe

From Joomla! Documentation

< API16:JFilterOutput
Revision as of 17:48, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== This method processes a string and replaces all instances of & with & in links only <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Des...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

[Edit Descripton]

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 />