Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Matteo Landi  
View profile  
 More options May 5 2012, 12:01 pm
From: Matteo Landi <mat...@matteolandi.net>
Date: Sat, 5 May 2012 18:01:51 +0200
Local: Sat, May 5 2012 12:01 pm
Subject: i
Hi everybody,

Could you tell me what is the right way to display html formatted content
extracted from the database?  Taking the blog tutorial as example, how is
possible to let users create posts containing html tags such as `strong`, `em`,
`ul` and so forth?

Thanks,
Matteo

--
http://www.matteolandi.net


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Display unescaped html elements" by Matteo Landi
Matteo Landi  
View profile  
 More options May 5 2012, 12:53 pm
From: Matteo Landi <mat...@matteolandi.net>
Date: Sat, 5 May 2012 18:53:14 +0200
Local: Sat, May 5 2012 12:53 pm
Subject: Display unescaped html elements
On May/05, Matteo Landi wrote:

> Hi everybody,

> Could you tell me what is the right way to display html formatted content
> extracted from the database?  Taking the blog tutorial as example, how is
> possible to let users create posts containing html tags such as `strong`, `em`,
> `ul` and so forth?

> Thanks,
> Matteo

> --
> http://www.matteolandi.net

Excuse me for double posting, but the previous message contained an incomplete
subject.

Cheers,
Matteo

--
http://www.matteolandi.net


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "i" by lowpass
lowpass  
View profile  
 More options May 7 2012, 7:16 pm
From: lowpass <zijn.digi...@gmail.com>
Date: Mon, 7 May 2012 19:16:19 -0400
Local: Mon, May 7 2012 7:16 pm
Subject: Re: i
echo $data['Post']['body'];

Maybe the question wasn't clear. What exactly do you mean about the
"right way to display" it?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Display unescaped html elements" by lowpass
lowpass  
View profile  
 More options May 7 2012, 7:20 pm
From: lowpass <zijn.digi...@gmail.com>
Date: Mon, 7 May 2012 19:20:58 -0400
Local: Mon, May 7 2012 7:20 pm
Subject: Re: Display unescaped html elements
How were they escaped? If the content has been run through
htmlspecialchars() before saving to the DB then:

echo htmlspecialchars_decode($data['Post']['body']);


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "i" by Matteo Landi
Matteo Landi  
View profile  
 More options May 16 2012, 3:55 pm
From: Matteo Landi <mat...@matteolandi.net>
Date: Wed, 16 May 2012 21:55:26 +0200
Local: Wed, May 16 2012 3:55 pm
Subject: Re: i

On May/07, lowpass wrote:
> echo $data['Post']['body'];

> Maybe the question wasn't clear. What exactly do you mean about the
> "right way to display" it?

It is funny how questions arise from dumb errors:  let me explain why.

As I tried to explain in my previous post, I wanted to save raw html tags inside
a blog post, and make the View display them accordinly;  unfortunately, in all
the experiments I made, tags were displayed as raw sequences (<em>asd</em>
instead of an italic asd).  So I complained the list about that.

The problem is that while editing the blog post to add html tags, I only
modified the title field which was rendered inside the View with a command like
this `$this->Html->link($post['Post']['title'], ...)`;  the `link` method
obviously escapes the content of the link label, resulting in html tags
displayed as raw characters :-)

So I edited the post body, and magically html tags were rendered properly!  Mea
culpa!

Cheers,
Matteo

--
http://www.matteolandi.net

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »