SocialLinksPattern drops list item text outside the links, and counts every mailto: as a social service
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Start by reading SocialLinksPattern, especially the list conversion, service() and isSocialCluster() paths; the issue names no file path or test. Reproduce with the Markdown or HTML reduction in the issue, then check cases with text beside links and lists containing only mailto: links. Done means those cases preserve list text and mail-only lists are not converted to social links.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
When SocialLinksPattern accepts a ul/ol as a social cluster, it builds core/social-link blocks from the anchors and discards everything else in the list items. Any text beside the links is silently lost. And because service() returns mail for every mailto: URL, isSocialCluster() accepts any list of two or more items that each contain an email address.
Seen in php-transformer v0.27.0, through FormatBridge with Markdown input (GFM to HTML first). The result was real data loss in a knowledge base entry: a history list became two mail social links, and the history lines were gone.
Reduction
Markdown:
- <[email protected]>
- 16 Nov: replied <[email protected]>
or the equivalent HTML:
<ul>
<li><a href="mailto:[email protected]">[email protected]</a></li>
<li>16 Nov: replied <a href="mailto:[email protected]">[email protected]</a></li>
</ul>
Output (v0.27.0):
<!-- wp:social-links {"showLabels":true,"className":"blocks-engine-source-social-item-spacing"} -->
<ul class="wp-block-social-links has-visible-labels blocks-engine-source-social-item-spacing">
<!-- wp:social-link {"url":"mailto:[email protected]","service":"mail","label":"[email protected]"} /-->
<!-- wp:social-link {"url":"mailto:[email protected]","service":"mail","label":"[email protected]"} /-->
</ul>
<!-- /wp:social-links -->
The 16 Nov: replied text is gone. A list with social hosts behaves the same way (- Code on [GitHub](https://github.com/x) / - Toots on [Mastodon](https://mastodon.social/@x) loses "Code on" and "Toots on").
Relation to #5979
#5979 (closed) stops text-labelled links to social hosts being treated as icons, which may cover the reductions above in a newer release. But the underlying data loss remains for any list the pattern does accept, for example icon links or an explicitly named .social list whose items also hold other text.
Expected
- A list whose items hold text outside their links is never lowered to
core/social-links(or the pattern declines and the list converts ascore/list). Social links can't hold that text, so accepting the list loses content. - A cluster made only of
mailto:links isn't treated as social on its own. Email addresses are ordinary content far more often than a social-icon row. - If text must be dropped, it should at least be reported as a fallback rather than lost silently.
Workaround downstream
In LH Content Converter we now hide http/https/mailto hrefs inside lists from the transformer for Markdown input (placeholder URLs on .invalid) and restore them afterwards. We'll drop that once this is fixed.
AI disclosure: diagnosed and filed with Claude (Anthropic) via the LocalHero MCP tooling, reproduced against the live converter.
- Lenguaje dominante
- PHP
- Estrellas
- 28
- Forks
- 5
- Merge medio
- 2 h 59 min
- PR fusionados (30 d)
- 942
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Automattic/blocks-engine
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Automattic/blocks-engine#6318 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#4943 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#4942 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Automattic/blocks-engine#4921 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Automattic/blocks-engine#775 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Automattic/blocks-engine
Issues similares
-
bug needs-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
camunda/orchestration-cluster-api-php#162 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Procedure for security issuesAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
TYPO3-Solr/ext-solr#4850 ·
Los mantenedores suelen responder en 2 días
-
Hex viewer drops ASCII '0' after a complete rowPosiblemente ocupada @palashranka la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
-
[Sync EN] stream: document the errors of the stream_context_*() and stream filter functions (#6091)Abiertosync-en
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día