HearthSim / hs-bugs

Unofficial Hearthstone issue tracker
https://hearthsim.info
65 stars 3 forks source link

Bad HTML in the descriptions of some Old Gods cards #459

Open jleclanche opened 8 years ago

jleclanche commented 8 years ago

Duplicate bold tags present.

Cult Sorcerer (OG_303):

[x]<b><b>Spell Damage</b> +1</b>
After you cast a spell,
give your C'Thun +1/+1
<i>(wherever it is).</i>

Twin Emperor Vek'lor (OG_131):

[x]<b><b>Taunt</b>
Battlecry:</b> If your C'Thun has
at least 10 Attack, summon
another Emperor.

The issue is only present in English.

Ack'd here: https://twitter.com/ywoo_dev/status/724806306175938560

troggnostupidhs commented 7 years ago

Is this fixed?

https://api.hearthstonejson.com/v1/15590/enUS/cards.json

"text":"[x]<b><b>Spell Damage</b> +1</b>\nAfter you cast a spell,\ngive your C'Thun +1/+1\n<i>(wherever it is).</i>"

"text" : "[x]<b><b>Taunt</b>\nBattlecry:</b> If your C'Thun has\nat least 10 Attack, summon\nanother Emperor."

jleclanche commented 7 years ago

It's not fixed no

troggnostupidhs commented 7 years ago

is the issue that there are two opening <b> tags at the start of the text?

jleclanche commented 7 years ago

Yes.

troggnostupidhs commented 6 years ago

I would like to bring this up again as valid html

https://validator.w3.org/#validate_by_input

<!DOCTYPE html>
<html lang="en">
<head><title>text</title></head>
<body>
<b><b>Taunt</b>\nBattlecry:</b>
</body>
</html>

image

jleclanche commented 6 years ago

That it's valid html5 doesn't make it correct to use. html5 is extremely lenient. I'm also saying "html" loosely; it happens to use html tags for bold/italic but it's a stripped down markup.

troggnostupidhs commented 6 years ago

https://stackoverflow.com/a/22186981

It's not invalid markup to have nested b elements, but there is no definitive answer to what nested b elements would actually mean.

That answer cites the html spec and says that nested should be fine (and mentions that the b tag itself is problematic in general).

<b> <b> </b> </b> should be nested correctly.

jleclanche commented 6 years ago

Again, that's really not the point. Whether it's semantically valid is irrelevant.

troggnostupidhs commented 6 years ago

What is the point of this ticket?