Level 16
Do the following @ebrahemsamer
{!! nl2br(e($product->description)) !!}
Explination
- The
e()function runs PHP's htmlspecialchars function with the double_encode option set to true by default: - The
nl2br()will replace\nand\rcharacters with<br>tags. -
{!! !!}will render the output string as html
Source
https://ericbusch.net/properly-display-line-breaks-from-a-textarea-using-blade
1 like