Digerkam
Digerkam

Reputation: 1919

Tumblr: PostSummary Outputs HTML Codes

When I am trying to use these lines:

{block:PostSummary}
  {PostSummary}
{/block:PostSummary}

I got HTML codes, not an excerpted pure text!

It's a big problem on Title and Meta:Description elements.

What should I do?

Thank you!!

Upvotes: 1

Views: 882

Answers (1)

unor
unor

Reputation: 96737

Have a a look at http://www.tumblr.com/docs/en/custom_themes#variable-transformations

By prefixing variables with special transformation keywords, Tumblr will output variables in specialized formats — useful when passing data to Javascript, etc.

[…] Plaintext
Prefix any theme variable with Plaintext to output the string with HTML-tags stripped and appropriate characters converted to HTML-entities so they’re safe to include in HTML attributes, etc..

So it'd probably look like:

{block:PostSummary}
  {PlaintextPostSummary}
{/block:PostSummary}

Upvotes: 1

Related Questions