La comunità italiana su CakePHP

You are not logged in. Please login or register.


Pages: 1

Atom RSS

Posts [ 4 ]

ToX

Topic: Le entità html (à, ecc) non si convertono in lettere nei links

sto avendo un noioso problema nell'inserimento di lettere accentate (tutte inserite tramite le relative entità html) nei link. in sostanza, se in un testo normale metto un'entità tipo "cioè" mi viene visualizzatio "cioè", correttamente; se faccio la stessa cosa in un link mi viene visualizzato "cioè" neutral

stessa cosa, naturalmente, se invece del nome dell'entità metto il relativo numero... é.

che succede?

Last edited by ToX (08-07-2008 16:42:08)

ToX

Re: Le entità html (à, ecc) non si convertono in lettere nei links

ho guardato il codice html risultante... pare che mi trasformi è in è sad ma che cazz...

dalpo

Re: Le entità html (à, ecc) non si convertono in lettere nei links

Ciao Tox

Htmlhelper::link filtra automaticamente tutto quello che inserisci, come hai potuto vedere.
Per evitare che ciò avvenga devi settare il 5° parametro escapeTitle a false

HtmlHelper::link( $title,
        $url = null,
        $htmlAttributes = array(),
        $confirmMessage = false,
        $escapeTitle = true     
    )

Allanon86

Re: Le entità html (à, ecc) non si convertono in lettere nei links

oppure puoi scrivere direttamente così:

$this->link('città', '/link-citta', null, null, null, false);

wink

Edit: omesso virgola tongue

Last edited by Allanon86 (15-07-2008 15:18:17)

Posts [ 4 ]

Guest posting is disabled. You must login or register to post a reply.

Pages: 1

Topic info

0 guests and 0 users are reading this topic now


Forum quick jump menu

Currently used extensions: pun_topic_online_users, pun_karma, pun_admin_hook_navigator, pun_bbcode. Copyright © 2008 PunBB

[ Generated in 0.055 seconds, 12 queries executed ]