[wp-hackers] adding HTML to readme.txt

Phillip Lord phillip.lord at newcastle.ac.uk
Fri May 11 14:22:27 UTC 2012



Okay, that was useful. Span tags are not, unfortunately, allowed in
readme.txt, AFAICK -- parse-readme.php contains. 


		$allowed = array(
			'a' => array(
				'href' => array(),
				'title' => array(),
				'rel' => array()),
			'blockquote' => array('cite' => array()),
			'br' => array(),
			'p' => array(),
			'code' => array(),
			'pre' => array(),
			'em' => array(),
			'strong' => array(),
			'ul' => array(),
			'ol' => array(),
			'li' => array(),
			'h3' => array(),
			'h4' => array()
		);

Which is unfortunate for me. Ah well. Think again. Thanks for the help. 

Phil


"Dion Hulse (dd32)" <wordpress at dd32.id.au> writes:
> Can you explain what exactly it's used to achieve? (Sorry, The
> wikipedia page didn't really help me understand what your use-case
> is).
> To be honest, from the sniplet of HTML you've given I wouldn't expect
> that to be displayed verbatim, simply due to needing to control what
> HTML is output to prevent plugins breaking things.
>
> The bbPress plugin that powers the Plugin directory is open source:
> http://plugins-svn.bbpress.org/svn-browser/trunk/
> I unfortunately have a feeling that that's a bit out of date with
> what's currently used, and I can't actually find the readme parser
> there anymore, but there might be something there to help you.
>
> On 11 May 2012 21:07, Phillip Lord <phillip.lord at newcastle.ac.uk> wrote:
>> Ryan McCue <lists at rotorised.com> writes:
>>
>>> Phillip Lord wrote:
>>>> I am guessing that readme.txt is not actually parsed my markdown but
>>>> something related. Is it possible to include raw HTML in? Can anyone
>>>> point me to an example?
>>>
>>> It is parsed by Markdown, but it's also passed through kses, which is most
>>> likely where the problem is arising.
>>>
>>> I'm sure one of the WordPress.org guys can chime in about exactly what kses
>>> replaces, but it's roughly the same as wp_kses()
>>
>>
>> Ah. wp_kses should let it through (it allows span with class and title).
>> I will have to hope someone knows for sure, as doing this black box is
>> going to be a bit futile.
>>
>> Phil
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>

-- 
Phillip Lord,                           Phone: +44 (0) 191 222 7827
Lecturer in Bioinformatics,             Email: phillip.lord at newcastle.ac.uk
School of Computing Science,            http://homepages.cs.ncl.ac.uk/phillip.lord
Room 914 Claremont Tower,               skype: russet_apples
Newcastle University,                   msn: msn at russet.org.uk
NE1 7RU                                 twitter: phillord


More information about the wp-hackers mailing list