Index: trunk/extensions/HtmlUi/classes/HtmlUiTemplate.php |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | } |
62 | 62 | return $data; |
63 | 63 | } |
64 | | - return htmlspecialchars( $data ); |
| 64 | + return htmlspecialchars( (string) $data ); |
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | } |
78 | 78 | return $data; |
79 | 79 | } |
80 | | - return htmlspecialchars_decode( $data ); |
| 80 | + return htmlspecialchars_decode( (string) $data ); |
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
— | — | @@ -97,18 +97,18 @@ |
98 | 98 | foreach ( $data as $key => $value ) { |
99 | 99 | if ( is_array( $value ) ) { |
100 | 100 | // Named list of attributes |
101 | | - $result[] = htmlspecialchars( $key ) . '="' . implode( ' ', $value ) . '"'; |
| 101 | + $result[] = self::escpae( $key ) . '="' . implode( ' ', (string) $value ) . '"'; |
102 | 102 | } else if ( is_string( $key ) ) { |
103 | 103 | // Named attribute |
104 | | - $result[] = htmlspecialchars( $key ) . '="' . $value . '"'; |
| 104 | + $result[] = self::escpae( $key ) . '="' . $value . '"'; |
105 | 105 | } else { |
106 | 106 | // Value-less attribute such as "checked" |
107 | | - $result[] = $value; |
| 107 | + $result[] = (string) $value; |
108 | 108 | } |
109 | 109 | } |
110 | 110 | } else { |
111 | 111 | // Value-less attribute such as "checked" |
112 | | - $result[] = $value; |
| 112 | + $result[] = (string) $value; |
113 | 113 | } |
114 | 114 | return count( $result ) ? ( ' ' . implode( ' ', $result ) ) : ''; |
115 | 115 | } |