solidusjs / wp-solidus

Headless WordPress theme for use with the WordPress JSON API and Solidus.
MIT License
1 stars 0 forks source link

#ZC5r2bWu Parse Excerpt Markdown #8

Closed localjo closed 9 years ago

localjo commented 9 years ago

Clique Tools allowed Markdown formatting in leads and thus these tags have been carried over into the content imported into WordPress as excerpts. But the Jetpack Markdown module we use to parse the content does not apply to the excerpts by default, so this PR adds a filter to parse the excerpt markdown before adding it to the API response.

localjo commented 9 years ago

The API response needs to be wrapped in a <p> tag, but it looks like it isn't currently.

localjo commented 9 years ago

Ok, I made sure the <p> tags are added. Currently "s are escaped with \", which seems right in the JSON response, but I'm not sure if that will cause problems when used in the page.

localjo commented 9 years ago

Just tested with Flatts locally, and the current output works! 👏

<p>Rascal Flatts&#8217; new music video for their latest single &#8220;Riot&#8221; is now live exclusively on NASH TV at <a href=\"http://www.nashtv.com\">www.nashtv.com</a>. The video will also be carried on all NASH TV platforms  including Cumulus Media, Inc. and NASH exclusive partner Music Choice.</p>

@pushred Just waiting on your 👍now.

pushred commented 9 years ago

:+1: Looks good