Skip to content

Commit

Permalink
fix issue: htmlentities
Browse files Browse the repository at this point in the history
  • Loading branch information
izica committed Jan 27, 2017
1 parent 3624b13 commit fb545eb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 67 deletions.
17 changes: 0 additions & 17 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,17 +0,0 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
47 changes: 0 additions & 47 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,47 +0,0 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
12 changes: 9 additions & 3 deletions src/IzicaMetaTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ public function setTitle($title)

public function getTitle()
{
return '<title>'.$this->title.'</title>';
if($this->title != "")
return '<title>'.$this->title.'</title>';
else
return "";
}

public function setByProperty($property, $content)
{
$this->meta_property[$property] = $content;
$this->meta_property[$property] = htmlentities($content);
}

public function unsetByProperty($properties){
Expand All @@ -37,7 +40,7 @@ public function unsetByProperty($properties){

public function setByName($name, $content)
{
$this->meta_name[$name] = $content;
$this->meta_name[$name] = htmlentities($content);
}

public function unsetByName($names){
Expand All @@ -55,6 +58,9 @@ public function unsetByName($names){

public function setCustom($key, $attributes)
{
foreach ($attributes as &$value) {
$value = htmlentities($value);
}
$this->meta_custom[$key] = $attributes;
}

Expand Down

0 comments on commit fb545eb

Please sign in to comment.