On 6/15/07, tired <[EMAIL PROTECTED]> wrote:
>
> I have used the 'mochikit sortable' table to sort data (loading a json
> file through ajax). In that table one of columns has linked data which
> htlml entity decoded by mochikit, so it show raw html instead link.
> For example, I supplied the data like
>
> <a href="drink-details.php?drink_id=153">Red Wine Glass: Use for red
> or white wine (if you don't have a white wine glass), or water.</a>
>
> But mochikit show it like,
>
> &lt;a href="drink-details.php?drink_id=153"&gt;Red Wine Glass: Use for
> red or white wine (if you don't have a white wine glass), or
> water.&lt;/a&gt;
>
> That is it decode the '<' and '>' to '&lt' and '&gt'.
>
> Anybody help me how to prevent this type decoding?

It's not decoding anything, the DOM works with nodes not markup. Text
turns into text nodes.

In order to turn literal HTML into a DOM node you'll have to use
something like this:

function htmlDiv(htmlText) {
    var s = DIV();
    s.innerHTML = htmlText;
    return s;
}

-bob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to