Actions

API16

Difference between revisions of "JFilterInput/checkAttribute"

From Joomla! Documentation

< API16:JFilterInput
(New page: ===Description=== Function to determine if contents of an attribute is safe <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JFilterInput/checkAttribu...)
 
m (removing red link to edit, no existant pages)
 
Line 3: Line 3:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JFilterInput/checkAttribute|Edit Descripton]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
  
{{Description:JFilterInput/checkAttribute}}
+
<! removed transcluded page call, red link never existed >
  
 
===Syntax===
 
===Syntax===
Line 41: Line 41:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JFilterInput/checkAttribute|Edit See Also]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
{{SeeAlso:JFilterInput/checkAttribute}}
+
<! removed transcluded page call, red link never existed >
  
 
===Examples===
 
===Examples===
Line 56: Line 56:
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>
 +
[[Category:Archived pages API16]]

Latest revision as of 23:07, 12 May 2013

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Function to determine if contents of an attribute is safe

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

static checkAttribute($attrSubSet)
Parameter Name Default Value Description
$attrSubSet A 2 element array for attributes name,value

Returns

boolean True if bad code is detected

Defined in

libraries/joomla/filter/filterinput.php

Importing

jimport( 'joomla.filter.filterinput' );

Source Body

public static function checkAttribute($attrSubSet)
{
        $attrSubSet[0] = strtolower($attrSubSet[0]);
        $attrSubSet[1] = strtolower($attrSubSet[1]);
        return (((strpos($attrSubSet[1], 'expression') !== false) && ($attrSubSet[0]) == 'style') || (strpos($attrSubSet[1], 'javascript:') !== false) || (strpos($attrSubSet[1], 'behaviour:') !== false) || (strpos($attrSubSet[1], 'vbscript:') !== false) || (strpos($attrSubSet[1], 'mocha:') !== false) || (strpos($attrSubSet[1], 'livescript:') !== false));
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />