figcaption transform bug
-
Hello,
We’re facing the same issue as OP in https://www.ads-software.com/support/topic/image-figcaption/
Was that resolved? What we currently have is:
`
<figure class=”wp-class”><img src=”file.jpg” alt=”alt-text” class=”wp-class” /><figcaption>caption here</figcaption></figure>
<p>Next paragraph text here</p>
`
That turns into this:
`
<figure><img src=”file.jpg” /></figure><figcaption>caption here</figcaption>Next paragraph text here</p>
`
This means that for any
<figure>
where we add afigcaption
, either via wp 5.2.x’s built-in block/gutenberg editor or through code view, both the caption and the proceeding paragraph doesn’t get rendered in the FB Instant Article view because:1. The
figcaption
has been broken out of its original containingfigure
tag
2. The opening<p>
tag for the proceeding paragraph disappears, making its syntax invalid.
3. The contents of bothfigcaption
and the next paragraph (for which the opening<p>
tag has disappeared) still appear in the instant article feed produced by WP Native Articles.i’ve tried the following transform rules, to no avail:
`
<!– match: –>
<figure class=”%s”><img src=”%s” alt=”%s” class=”%s” /><figcaption>%s</figcaption></figure><!– to: –>
<figure><img src=”${2}” /><figcaption>${5}</figcaption></figure><!– match: –>
<figcaption>%s</figcaption><!– to: –>
<figcaption>${1}</figcaption><p>
`
Please advise; thanks!
(I can email a link to our instant article feed + specific instances where this occurs, or code snippets if required)
- The topic ‘figcaption transform bug’ is closed to new replies.