Skip to content

Commit

Permalink
Fixed #9
Browse files Browse the repository at this point in the history
  • Loading branch information
rotsee committed Apr 13, 2015
1 parent b1b644c commit 86103a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LinkAttributes.body.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

class LinkAttributes {
private $attrsAllowed=array( 'rel', 'rev', 'charset ', 'type', 'hreflang', 'itemprop', 'media', 'title', 'accesskey', 'target' );
private static $attrsAllowed=array( 'rel', 'rev', 'charset ', 'type', 'hreflang', 'itemprop', 'media', 'title', 'accesskey', 'target' );

private function doExtractAttributes ( &$text, &$attribs ) {

Expand All @@ -23,7 +23,7 @@ private function doExtractAttributes ( &$text, &$attribs ) {
$pair = explode( '=', $a );

/* Only go ahead if we have a aaa=bbb pattern, and aaa i an allowed attribute */
if ( isset( $pair[1] ) && in_array( $pair[0], $this->attrsAllowed ) ) {
if ( isset( $pair[1] ) && in_array( $pair[0], self::attrsAllowed ) ) {

/* Add to existing attribute, or create a new */
if ( isset( $attribs[$pair[0]] ) ) {
Expand Down

0 comments on commit 86103a7

Please sign in to comment.