How to remove the img tag from `p-content`

Aperta
#56 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
28/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php
Ambito
backend

Direzione di ricerca

Start by reproducing the provided HTML example and inspecting how the mf2 parser represents its p-content and nested u-photo for XRay. Trace how XRay handles that parsed content; done means it can remove the image from content even when the parser returns plaintext without an img tag. This issue is part of #52, so check that context too.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

blocked

Part of #52.

When the original HTML uses p-content that contains a u-photo inside, the mf2 parser strips out the HTML completely, returning a plaintext string for content that doesn't contain an img tag at all. XRay has no way to remove the image from the content.

HTML

<html>
  <head>
    <title>Test</title>
  </head>
  <body class="h-entry">
    <p class="p-content p-name">This is a photo post with an <code>img</code> tag inside the content. <img class="u-photo" src="http://target.example.com/photo.jpg"></p>
  </body>
</html>

mf2 json

        {
            "type": [
                "h-entry"
            ],
            "properties": {
                "content": [
                    "This is a photo post with an img tag inside the content. http://target.example.com/photo.jpg"
                ],
                "name": [
                    "This is a photo post with an img tag inside the content. http://target.example.com/photo.jpg"
                ],
                "photo": [
                    "http://target.example.com/photo.jpg"
                ]
            }
        }

https://pin13.net/mf2/?id=20180112195016745

Lingua principale
PHP
Stelle
96
Fork
17
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di aaronpk/XRay

Tutte le issue di aaronpk/XRay

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.