Skip to content

Fix entry's short description when it has html in it #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kswedberg opened this issue Oct 17, 2012 · 5 comments
Closed

Fix entry's short description when it has html in it #21

kswedberg opened this issue Oct 17, 2012 · 5 comments

Comments

@kswedberg
Copy link
Member

Needs to be <xsl:apply-templates select="desc"/> instead of <xsl:value-of select="desc"/>. Thanks, @scottgonzalez !

@jzaefferer
Copy link
Member

Same here, something to test with?

@kswedberg
Copy link
Member Author

Look at the first few methods at http://stage.api.jquery.com/category/ajax/ and see how they're truncated.

Also, the short descriptions on the individual entry pages strip out the html, but leave the text intact: http://stage.api.jquery.com/ajaxComplete/

@jzaefferer
Copy link
Member

I've commited the proposed fix, but that doesn't address the issue on the category page. For that we need to change the code that generates the excerpt:

(its not a WordPress issue, the truncation happens here)

Can't really tell yet what the escape-string template does, or why it rips of the markup.

@jzaefferer
Copy link
Member

@scottgonzalez can you take over here?

@scottgonzalez
Copy link
Member

This fix ensures that the full text is inserted into the excerpt, but it does not copy the tags, so the result is a plaintext description, instead of an HTML description. Copying the tags is a complex process that seems fairly insane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants