mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 11:48:05 +00:00
Stop escaping notes, move to parser.
This commit is contained in:
@@ -63,6 +63,7 @@ use Illuminate\Database\Query\Builder;
|
||||
class Note extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that should be casted to native types.
|
||||
*
|
||||
@@ -77,16 +78,6 @@ class Note extends Model
|
||||
/** @var array Fields that can be filled */
|
||||
protected $fillable = ['title', 'text', 'noteable_id', 'noteable_type'];
|
||||
|
||||
/**
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTextAttribute(?string $value): ?string
|
||||
{
|
||||
return null === $value ? null : htmlspecialchars_decode($value, ENT_QUOTES);
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
@@ -96,14 +87,4 @@ class Note extends Model
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function setTextAttribute(string $value): void
|
||||
{
|
||||
$this->attributes['text'] = e($value);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user