[TYPO3-UG Italy] rteHtmlarea sostituzione tag
Andrea Nenci
andrea.nenci at uniecampus.it
Thu Jan 18 14:58:30 CET 2018
Buonasera,
vorrei impedire la sostituzione dei tag <em> e <strong> in <i> e <b>, in quanto questi ultimi risultano non corretti per la validazione degli standard WCAG 2.0 e successivi.
Nel manuale dell'estensione non ho trovato niente di utile, mentre cercando nei file dell'estensione ho trovato questa funzione:
[file: /typo3_src-6.2.31/typo3/sysext/rtehtmlarea/Classes/Extension/DefaultInline.php ]
/**
* Return tranformed content
*
* @param string $content: The content that is about to be sent to the RTE
* @return string the transformed content
*/
public function transformContent($content) {
// Change the strong and em tags for gecko browsers
if ($this->htmlAreaRTE->client['browser'] == 'gecko') {
// change <strong> to <b>
$content = preg_replace('/<(\\/?)strong/i', '<$1b', $content);
// change <em> to <i>
$content = preg_replace('/<(\\/?)em([^b>]*>)/i', '<$1i$2', $content);
}
return $content;
}
Commentando la trasformazione e lasciando solo l'istruzione di return non cambia niente e nell'output generato della pagina web ho tag <b> invece che <strong>
Qualcuno di voi sa come posso fare?
Grazie
More information about the TYPO3-UG-Italy
mailing list