wordpress-mobile / wordpress-mobile/AztecEditor-iOS

Generated HTML for edited links containing multibyte characters is weird.

Aperta
#856 1 commento 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

[Type] Bug
Lingua principale
Swift
Stelle
669
Fork
153
Merge medio
11h 27m
PR unite (30g)
4

Descrizione

This is another side-effect of the underlying bug behind #853. #854 improves how the editor behaves when tapping on the "link" button in the toolbar, but the output HTML stills isn't great.

Expected behavior

After creating a link containing multibyte characters and then editing it, there's only one <a> element in the HTML output:

<a href="https://example.com">❤️ test 👍</a>
Actual behavior

Multiple <a> elements are present in the output:

<p>
<a href="http://example.com">❤️</a><a href="http://example.com"> test </a><a href="http://example.com">👍</a>
</p>
Steps to reproduce the behavior
  1. Insert a link with any URL, consisting of multi-byte characters (two emojis is probably the easiest).
  2. Put a cursor between the two characters.
  3. Start typing something, I usually add test in between the two.
  4. Look at the resulting HTML.

Guida per i contributori

Apri la guida per i contributori

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.

Direzione di ricerca

Inizia riproducendo il problema in AztecEditor-iOS con il pulsante per i link della barra degli strumenti: crea un link attorno a caratteri multibyte, modificalo tra i caratteri e ispeziona l’HTML generato. La correzione è completa quando il testo modificato è contenuto in un unico elemento con l’URL prevista, invece che in più elementi.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.