mirror of
https://we.phorge.it/source/phorge.git
synced 2025-04-01 23:18:15 +02:00
Remarkup: Correctly render inline embed layout
Summary: The generated HTML is like `<p>some text <div …>…</div> more text</p>`, and HTML `<p/>` tags may not contain block content like `<div/>` tags. Browsers actually parse this as if it was `<p>some text </p><div …>…</div> more text<p></p>` (sic). The layout CSS class already has `display: inline` set, but this is not sufficient. Browser's HTML parser doesn't care what CSS rules will be applied, it only deals with the meanings of tags. Fixes T7201. Test Plan: Verify that the following displays the image inline: `some text {Fnnn,layout=inline} more text` Reviewers: chad, epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Projects: #remarkup Maniphest Tasks: T7201 Differential Revision: https://secure.phabricator.com/D11706
This commit is contained in:
parent
fce178caf2
commit
74b860519d
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ final class PhabricatorEmbedFileRemarkupRule
|
||||||
}
|
}
|
||||||
|
|
||||||
return phutil_tag(
|
return phutil_tag(
|
||||||
'div',
|
($options['layout'] == 'inline' ? 'span' : 'div'),
|
||||||
array(
|
array(
|
||||||
'class' => $layout_class,
|
'class' => $layout_class,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Reference in a new issue