Closed Shelob9 closed 8 years ago
In addition - the same is true of bulleted lists inserted directly in the template. They do not display as lists, only as separate lines of text.
A fix or a work-around is acceptable for now. I don't know a good alternative at the moment. (user in mentioned thread).
In the field settings 'Additional Field Options' tab, where it allows HTML, does it have those HTML tags whitelisted?
What is the correct way to list allowed tags? I've tried:
ul,li,h2,h4
and tags with markup < >
The result is no tags are read from the field. At the moment, all tags are being read except lists. Do I have to list all tags that might be used if I whitelist?
Also, since the template itself won't accept list tags, it appears this is a wider issue.
ul li h2 h4
format, but I'll be committing a new patch that will automatically handle comma separated or <tag>
syntax as well.
Sounds good, but trying it as you suggest, what it does is strip the formatting out of the field. Or at least that is what I am seeing. Since the field is formatted with the visual editor by the user, it would seem that there could be a setting to just embed the formatting as is. If I wanted to override I would think the best option would be to use small plain text fields and format them in the template. I'm trying to avoid that because this application is for technical job postings that include (ever changing) lists of skills.
The allowed html tags option lets you specify which tags you want to allow. If you leave it empty, no tags will be removed and it should work entirely as expected for you. Let me know if you still have issues.
Also, how are you outputting this field in your template?
That is how it is working in this case. If I do not specify any tags in the Allowed HTML tags field, the template I am using allows tags like headline, underline, strong, etc. to be passed through and parsed. The only one that does not pass through is lists (ul, li). Even if I specify lists in the Allowed HTML tags, lists are not displayed. They also will not parse if I put them directly in the template to show a couple of options for contacting HR about the referenced job. In short, lists do not parse in the implementation at all, whether they are part of a WSIWYG field or part of text included in the template to be shown in the displayed page. So far, they are the only tag that is not properly parsed.
What other options do you have set for your 'Additional Field Options' tab on that field?
How are you outputting this field in your template?
Additional Field Options TinyMCE Enable wptexturize enable convert_chars enable wpautop Advanced - No options
In Template the fields are being displayed with (paragraph tag) {@requirements} (close paragraph tag)
To display a bulleted field in the template we're using standard HTML:
Which, of course, works in this comment - but doesn't when I use the same code in the template. It displays the headline, and the lines of text, but no indents and no bullet.
I've tested a wysiwyg field added to the standard Post object and output it using shortcodes with the expected results.
With this information I can try to reproduce your situation.
A couple other thoughts you might check on your end:
Another one that never reproduced and has gone open a long time without any further information.
User in this issue reports that bulleted lists created in a WYSIWYG field are not displaying with the proper formatting.