Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.www.php > #21509 > unrolled thread

Permettere i link nelle textarea

Started bySandro kensan <kensan@kensan.it>
First post2017-03-07 16:23 +0100
Last post2017-03-07 16:23 +0100
Articles 1 — 1 participant

Back to article view | Back to it.comp.www.php


Contents

  Permettere i link nelle textarea Sandro kensan <kensan@kensan.it> - 2017-03-07 16:23 +0100

#21509 — Permettere i link nelle textarea

FromSandro kensan <kensan@kensan.it>
Date2017-03-07 16:23 +0100
SubjectPermettere i link nelle textarea
Message-ID<ei81itFmqk7U1@mid.individual.net>
Ho visto che wordpress e altri CMS permettono l'inserimento dei link
(tag href), dei tag italico e bold e di altri tag nei commenti.

In pratica i commenti non vengono completamente encodati con
htmlspecialchars.

Qualcuno sa linkarmi uno script o una classe che fa questo lavoro
tramite il DOM e non tramite le espressioni regolari?

Ho giĆ  trovato uno script con preg_replace ma l'ho immediatamente scartato.

Penso si tratti di percorrere tutto l'albero dom e di encodare tutti i
tag che sono diversi da quelli permessi.
-- 
Sandro kensan www.kensan.it & www.qiqi.it geek site
Saluto gli agenti della NSA - Hello NSA - www.nsa.gov

[toc] | [standalone]


Back to top | Article view | it.comp.www.php


csiph-web