Permalink
Browse files

Removed tags

  • Loading branch information...
1 parent 2837f18 commit b3611031d773a43e05e8efce04fe0d37b660dd6a @lserwatka lserwatka committed May 11, 2012
@@ -54,7 +54,7 @@ public function attributes()
public function attribute( $name )
{
if ( $this->hasAttribute( $name ) )
- return $this->attributes[$name];
+ return strip_tags( $this->attributes[$name] );
else
return false;
}
@@ -190,7 +190,7 @@ public static function storeProperties()
if ( !$property instanceof ezcsseProperty )
continue;
- $value = isset( $propValue['value'] ) ? $propValue['value'] : '';
+ $value = isset( $propValue['value'] ) ? strip_tags( $propValue['value'] ) : '';
switch( $property->attribute( 'name' ) )
{
@@ -200,8 +200,8 @@ public static function storeProperties()
break;
}
- $keyword = isset( $propValue['keyword'] ) ? $propValue['keyword'] : '';
- $length = isset( $propValue['length'] ) ? $propValue['length'] : '';
+ $keyword = isset( $propValue['keyword'] ) ? strip_tags( $propValue['keyword'] ) : '';
+ $length = isset( $propValue['length'] ) ? strip_tags( $propValue['length'] ) : '';
$property->setAttribute( 'keyword', $keyword );
$property->setAttribute( 'length', $length );
@@ -612,4 +612,4 @@ public static function getPropertyList()
}
}
-?>
+?>
@@ -1841,16 +1841,16 @@ YAHOO.ez.StyleEditor = function() {
var oName = oForm.elements[j].name;
if( oName == "Params[properties][" + i + "][value]" ) {
- oProperty.value = oElement.value;
+ oProperty.value = strip_tags( oElement.value );
}
if( oName == "Params[properties][" + i + "][keyword]" ) {
if ( oElement.nodeName.toLowerCase() == "select" && oElement.disabled == false ) {
oProperty.keyword = oElement.options[oElement.selectedIndex].value;
} else if ( oElement.nodeName.toLowerCase() == "input" ) {
- oProperty.keyword = oElement.value;
+ oProperty.keyword = strip_tags( oElement.value );
} else {
- oProperty.keyword = oProperty.value;
+ oProperty.keyword = strip_tags( oProperty.value );
}
}
@@ -2058,6 +2058,10 @@ YAHOO.ez.StyleEditor = function() {
oCachedProperties = [];
}
+ var strip_tags = function(str) {
+ return str.replace(/(<([^>]+)>)/ig,"");
+ }
+
/*
public section
*/

0 comments on commit b361103

Please sign in to comment.