Kenapa output yang di hasilkan strtr(To::JSON([...])) null, saat content mengandung element url/ link ?
taufik-nurrohman opened this issue · comments
Taufik Nurrohman commented
Discussed in #199
Originally posted by lokersumatera March 1, 2022
Kang, pada panel input text yang mengandung elemen <a href="alamaturl.com/link">URL</a>
, saat ditampilkan sebagai struktur data JSON outputnya null, saat saya hapus elemen yang mengandung url/ link outputnya normal.
Berikut kode yang saya tulis:
<script type="application/ld+json">
<?=strtr(To::JSON([
...
'description'=>$page->job_description
...
]), ["\\/" => '/']);?>
</script>