The "toMarkdown" function prepares content to be sent, primarily, to Diaspora. The HTML to Markdown converter by default "preserves HTML tags without Markdown equivalents like <span> and <div>." At least according to the README in /friendica/vendor/league/html-to-markdown/ - which also says "To strip HTML tags that don’t have a Markdown equivalent while preserving the content inside them, set strip_tags..." Diaspora, however, does not appear to know what to DO with the HTML sent to it. It actually appears to encode the HTML and displays the code in the post body rather than rendering it as HTML. In which case it would make more sense to strip out all tags that have no Markdown equivalents. Example The post as sent from Friendica mixed BBcode and Markdown: [class=postbox-ocean]Norddeutscher Bürger [/class] The BBcode gets converted into an HTML <span> tag. It also looks like Diaspora encoded the Markdown for the image rather than parsing it, or at the very least didn't parse it as Markdown. Yet another reason to strip out HTML that has no Markdown equivalents. It looks like it may be encoding the tags and the content inside the tags. And, yes, I'm aware the [class] BBcode was marked as "deprecated" in the Friendica code, but it's the only way my Bookface scheme for the "Frio" theme could implement both profile "Cover Photos" and "Postboxes." Which won't display to other platforms anyway, so I don't want to see this custom BBcode removed, I just think it needs to be stripped out before content is delivered to other platforms. (There is a related issue with Hubzilla where the raw BBcode is coming through unparsed because the [class] code apparently does not exist in Hubzilla's BBcodes. But I've no clue where or how to fix that in Friendica or if it can be as it may need to be handled on Hubzilla's end). |
||
---|---|---|
.ddev | ||
.devcontainer | ||
.github | ||
.tx | ||
.woodpecker | ||
bin | ||
config | ||
doc | ||
images | ||
LICENSES | ||
mod | ||
mods | ||
spec | ||
src | ||
static | ||
tests | ||
view | ||
.codecov.yml | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.htaccess-dist | ||
.php-cs-fixer.dist.php | ||
.phpmd-ruleset.xml | ||
.phpmd-ruleset.xml.license | ||
.phpstan.neon | ||
CHANGELOG | ||
CHANGELOG.license | ||
composer.json | ||
composer.lock | ||
CONTRIBUTING.md | ||
CONTRIBUTING.md.license | ||
CREDITS.txt | ||
CREDITS.txt.license | ||
database.sql | ||
docblox.dist.xml | ||
docblox.dist.xml.license | ||
Doxyfile | ||
Doxyfile.license | ||
FEDERATION.md | ||
FEDERATION.md.license | ||
index.php | ||
LICENSE | ||
README.md | ||
README.md.license | ||
REUSE.toml | ||
REUSE.toml.license | ||
ruleset.xml | ||
ruleset.xml.license | ||
security.txt | ||
security.txt.license | ||
translations.txt.license | ||
update.php | ||
Vagrantfile | ||
Vagrantfile.license | ||
VERSION | ||
VERSION.license |
Friendica - your open and free social network
Welcome to the free social web. Friendica is a platform for decentralised social communication linking to other independent social and corporate services.
Friendica connects you to a federated communications network of thousands of servers called the Fediverse. Through various protocols you can interact with anyone on Friendica, Mastodon, Lemmy, Diaspora, Misskey, Peertube, Pixelfed, Pleroma and many more. Receiving content from Tumblr, WordPress and RSS is also possible. Friendica allows to import and mirror your content via add-ons such as ITTT and Buffer. You can control the privacy scope of your content.
Being part of the Fediverse allows you to be free from data-harvesting corporations. Enjoy open social communication, independent of any specific provider.
Join Friendica today or set up your own Friendica instance.
Friendica on desktop
Friendica on mobile
Endorsements
- Friendica is listed on
in the Fediverse category.