Unit tests - Tag matcher (#1237)

Clears out all bad HTML tags noted by the tag matcher unit test.
This commit is contained in:
skull132
2016-12-18 11:54:05 +02:00
committed by GitHub
parent ab1900f54a
commit c7352e45a5
18 changed files with 40 additions and 41 deletions

View File

@@ -348,13 +348,13 @@ var/global/list/additional_antag_types = list()
var/text = ""
if(surviving_total > 0)
text += "<br>There [surviving_total>1 ? "were <b>[surviving_total] survivors</b>" : "was <b>one survivor</b>"]</b>"
text += " (<b>[escaped_total>0 ? escaped_total : "none"] [emergency_shuttle.evac ? "escaped" : "transferred"]</b>) and <b>[ghosts] ghosts</b>.</b><br>"
text += "<br>There [surviving_total>1 ? "were <b>[surviving_total] survivors</b>" : "was <b>one survivor</b>"]"
text += " (<b>[escaped_total>0 ? escaped_total : "none"] [emergency_shuttle.evac ? "escaped" : "transferred"]</b>) and <b>[ghosts] ghosts</b>.<br>"
discord_text += "There [surviving_total>1 ? "were **[surviving_total] survivors**" : "was **one survivor**"]"
discord_text += " ([escaped_total>0 ? escaped_total : "none"] [emergency_shuttle.evac ? "escaped" : "transferred"]) and **[ghosts] ghosts**."
else
text += "There were <b>no survivors</b> (<b>[ghosts] ghosts</b>).</b>"
text += "There were <b>no survivors</b> (<b>[ghosts] ghosts</b>)."
discord_text += "There were **no survivors** ([ghosts] ghosts)."
world << text

View File

@@ -28,7 +28,7 @@
sleep(10)
borg << "Connection to station AI successful. Synchronizing laws..." //Fluff.
sleep(5)
borg << "<span class='danger'>You have been bound to an AI, Laws synchronized!" //to provide a noticable chat notification.
borg << "<span class='danger'>You have been bound to an AI, Laws synchronized!</span>" //to provide a noticable chat notification.
borg.lawupdate = 1 //Required for sync() to function.
borg.sync()
borg.show_laws(0) //This should display updated laws to the borg.

View File

@@ -860,9 +860,9 @@
vampire.status |= VAMP_DRAINING
visible_message("\red <b>[src.name] bites [T.name]'s neck!<b>", "\red <b>You bite [T.name]'s neck and begin to drain their blood, as the first step of introducing the corruption of the Veil to them.</b>", "\blue You hear a soft puncture and a wet sucking noise")
visible_message("\red <b>[src.name] bites [T.name]'s neck!</b>", "\red <b>You bite [T.name]'s neck and begin to drain their blood, as the first step of introducing the corruption of the Veil to them.</b>", "\blue You hear a soft puncture and a wet sucking noise")
T << "<span class='notice><br>You are currently being turned into a vampire. You will die in the course of this, but you will be revived by the end. Please do not ghost out of your body until the process is complete.</span>"
T << "<span class='notice'><br>You are currently being turned into a vampire. You will die in the course of this, but you will be revived by the end. Please do not ghost out of your body until the process is complete.</span>"
while (do_mob(src, T, 50))
if (!mind.vampire)

View File

@@ -99,8 +99,8 @@
if(src.panelopen) //The maintenance panel is open. Time for some shady stuff
dat+= "<HEAD><TITLE>Suit storage unit: Maintenance panel</TITLE></HEAD>"
dat+= "<Font color ='black'><B>Maintenance panel controls</B></font><HR>"
dat+= "<font color ='grey'>The panel is ridden with controls, button and meters, labeled in strange signs and symbols that <BR>you cannot understand. Probably the manufactoring world's language.<BR> Among other things, a few controls catch your eye.<BR><BR>"
dat+= text("<font color ='black'>A small dial with a \"ë\" symbol embroidded on it. It's pointing towards a gauge that reads []</font>.<BR> <font color='blue'><A href='?src=\ref[];toggleUV=1'> Turn towards []</A><BR>",(src.issuperUV ? "15nm" : "185nm"),src,(src.issuperUV ? "185nm" : "15nm") )
dat+= "<font color ='grey'>The panel is ridden with controls, button and meters, labeled in strange signs and symbols that <BR>you cannot understand. Probably the manufactoring world's language.<BR> Among other things, a few controls catch your eye.<BR><BR></font>"
dat+= text("<font color ='black'>A small dial with a \"ë\" symbol embroidded on it. It's pointing towards a gauge that reads []</font>.<BR> <font color='blue'><A href='?src=\ref[];toggleUV=1'> Turn towards []</A><BR></font>",(src.issuperUV ? "15nm" : "185nm"),src,(src.issuperUV ? "185nm" : "15nm") )
dat+= text("<font color ='black'>A thick old-style button, with 2 grimy LED lights next to it. The [] LED is on.</font><BR><font color ='blue'><A href='?src=\ref[];togglesafeties=1'>Press button</a></font>",(src.safetieson? "<font color='green'><B>GREEN</B></font>" : "<font color='red'><B>RED</B></font>"),src)
dat+= text("<HR><BR><A href='?src=\ref[];mach_close=suit_storage_unit'>Close panel</A>", user)
//user << browse(dat, "window=ssu_m_panel;size=400x500")

View File

@@ -155,7 +155,7 @@
user << span("notice", "You pry the cover off [src].")
setconstructionstate(1)
else
user << span("notice", "You try to pry the cover off [src] but it doesn't budge.</span>")
user << span("notice", "You try to pry the cover off [src] but it doesn't budge.")
return
if (1)

View File

@@ -109,7 +109,7 @@
/obj/item/weapon/melee/baton/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
if(status && (CLUMSY in user.mutations) && prob(50))
user << "span class='danger'>You accidentally hit yourself with the [src]!</span>"
user << "<span class='danger'>You accidentally hit yourself with the [src]!</span>"
user.Weaken(30)
deductcharge(hitcost)
return

View File

@@ -8,7 +8,7 @@
* Banhammer
*/
/obj/item/weapon/banhammer/attack(mob/M as mob, mob/user as mob)
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>"
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]</b></font>"
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
playsound(loc, 'sound/effects/adminhelp.ogg', 15)

View File

@@ -257,6 +257,6 @@
attack_verb = list("banned")
/obj/item/weapon/banhammer/attack(mob/M as mob, mob/user as mob)
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>"
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]</b></font>"
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
playsound(loc, 'sound/effects/adminhelp.ogg', 15)

View File

@@ -346,7 +346,7 @@ proc/admin_notice(var/message, var/rights)
if(0)
dat += {"Welcome to the admin newscaster.<BR> Here you can add, edit and censor every newspiece on the network.
<BR>Feed channels and stories entered through here will be uneditable and handled as official news by the rest of the units.
<BR>Note that this panel allows full freedom over the news network, there are no constrictions except the few basic ones. Don't break things!</FONT>
<BR>Note that this panel allows full freedom over the news network, there are no constrictions except the few basic ones. Don't break things!
"}
if(news_network.wanted_issue)
dat+= "<HR><A href='?src=\ref[src];ac_view_wanted=1'>Read Wanted Issue</A>"
@@ -431,7 +431,7 @@ proc/admin_notice(var/message, var/rights)
if(src.admincaster_feed_channel.censored)
dat+={"
<FONT COLOR='red'><B>ATTENTION: </B></FONT>This channel has been deemed as threatening to the welfare of the station, and marked with a [company_name] D-Notice.<BR>
No further feed story additions are allowed while the D-Notice is in effect.</FONT><BR><BR>
No further feed story additions are allowed while the D-Notice is in effect.<BR><BR>
"}
else
if( isemptylist(src.admincaster_feed_channel.messages) )
@@ -498,7 +498,7 @@ proc/admin_notice(var/message, var/rights)
if(src.admincaster_feed_channel.censored)
dat+={"
<FONT COLOR='red'><B>ATTENTION: </B></FONT>This channel has been deemed as threatening to the welfare of the station, and marked with a [company_name] D-Notice.<BR>
No further feed story additions are allowed while the D-Notice is in effect.</FONT><BR><BR>
No further feed story additions are allowed while the D-Notice is in effect.<BR><BR>
"}
else
if( isemptylist(src.admincaster_feed_channel.messages) )

View File

@@ -79,7 +79,7 @@
ban_unban_log_save("[ckey] warned [warned_ckey], resulting in a [AUTOBANTIME] minute autoban.")
if(C)
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban.")
C << "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes."
C << "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.</font>"
qdel(C)
else
message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban.")

View File

@@ -275,7 +275,7 @@
var/current_progress = language_progress[L.name]
current_progress += 1
language_progress[L.name] = current_progress
src << "<span class='notice'><font size=3>You come a little closer to learning [L.name]!</span>"
src << "<span class='notice'><font size=3>You come a little closer to learning [L.name]!</font></span>"
learned = 2
if (!learned)
@@ -292,5 +292,5 @@
for (var/i in language_progress)
if (language_progress[i] >= LANGUAGE_POINTS_TO_LEARN)
add_language(i)
src << "<span class='notice'><font size=3>You have mastered the [i] language!!</span>"
src << "<span class='notice'><font size=3>You have mastered the [i] language!!</font></span>"
language_progress.Remove(i)

View File

@@ -518,7 +518,7 @@ if (flashlight_active)
for (var/datum/language/L in languages)
if (!(L in host.languages))
host.add_language(L.name)
host << "<span class='notice'><font size=3>[src] has passed on its knowledge of the [L.name] language to you!</span>"
host << "<span class='notice'><font size=3>[src] has passed on its knowledge of the [L.name] language to you!</font></span>"
languages = host.languages.Copy()

View File

@@ -162,7 +162,7 @@ emp_act
if(user == src) // Attacking yourself can't miss
target_zone = user.zone_sel.selecting
if(!target_zone)
visible_message("\red <B>[user] misses [src] with \the [I]!")
visible_message("\red <b>[user] misses [src] with \the [I]!</b>")
return 0
//var/obj/item/organ/external/affecting = get_organ(target_zone)

View File

@@ -73,7 +73,7 @@
return 0
if (!victim.mob_size || !src.mob_size)
src << "<span class='danger> Error, no mob size defined for [victim.type]! You have encountered a bug, report it on github </span>"
src << "<span class='danger'> Error, no mob size defined for [victim.type]! You have encountered a bug, report it on github </span>"
return 0
if (!mouth_size)
@@ -336,4 +336,3 @@
src.composition_reagent_quantity = size_reagent
#undef PPM

View File

@@ -333,7 +333,7 @@ var/controlling
host.druggy = max(host.druggy, 50)
host.slurring = max(host.slurring, 10)
usr << "<b>You stimulate [host.name]'s brain, injecting waves of endorphines and dopamine into the tissue. They should now forget all their worries, particularly relating to you, for around a minute."
usr << "<b>You stimulate [host.name]'s brain, injecting waves of endorphines and dopamine into the tissue. They should now forget all their worries, particularly relating to you, for around a minute.</b>"
host << "\red You are feeling wonderful! Your head is numb and drowsy, and you can't help forgetting all the worries in the world."
@@ -400,7 +400,7 @@ var/controlling
src.exit_host()
src.enter_host(target)
usr << "<b>You successfully jumped to [target]."
usr << "<b>You successfully jumped to [target].</b>"
log_admin("[src.key] has jumped to [target]")
message_admins("[src.key] has jumped to [target]")
@@ -439,7 +439,7 @@ var/controlling
src.exit_host()
src.enter_host(target)
usr << "<b>You successfully jumped to [target]."
usr << "<b>You successfully jumped to [target].</b>"
log_admin("[src.key] has jumped to [target]")
message_admins("[src.key] has jumped to [target]")
@@ -462,7 +462,7 @@ var/controlling
src.exit_host()
src.enter_host(target)
usr << "<b>You successfully jumped to [target]."
usr << "<b>You successfully jumped to [target].</b>"
log_admin("[src.key] has jumped to [target]")
message_admins("[src.key] has jumped to [target]")
@@ -482,7 +482,7 @@ var/controlling
src.indoctrinated.Add(host)
usr << "<b>You successfully indoctrinated [host]."
usr << "<b>You successfully indoctrinated [host].</b>"
host << "\red Your head feels a bit roomier.."
log_admin("[src.key] has attuned [host]")
@@ -500,7 +500,7 @@ var/controlling
return
if(!use_points(500)) return
usr << "<b>You inject drugs into [host]."
usr << "<b>You inject drugs into [host].</b>"
host << "\red You feel your body strengthen and your pain subside.."
host.analgesic = 60
while(host.analgesic > 0)

View File

@@ -412,7 +412,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
apply_damage(damage, O.damtype, used_weapon = "[O.name]")
else
usr << "<span class='danger>This weapon is ineffective, it does no damage.</span>"
usr << "<span class='danger'>This weapon is ineffective, it does no damage.</span>"
visible_message("<span class='danger'>\The [src] has been attacked with the [O] by [user].</span>")
user.do_attack_animation(src)

View File

@@ -233,7 +233,7 @@
if (playemote)
if(reflex)
user.visible_message(
"<span class='reflex_shoot'><b>\The [user] fires \the [src][pointblank ? " point blank at \the [target]":""] by reflex!<b></span>",
"<span class='reflex_shoot'><b>\The [user] fires \the [src][pointblank ? " point blank at \the [target]":""] by reflex!</b></span>",
"<span class='reflex_shoot'>You fire \the [src] by reflex!</span>",
"You hear a [fire_sound_text]!"
)

View File

@@ -163,7 +163,7 @@ var/list/ventcrawl_machinery = list(
if(vent_found)
if(vent_found.network && (vent_found.network.normal_members.len || vent_found.network.line_members.len))
visible_message("<span class='warning'>[src] begins to climb into the ventilation system!","<span class='notice'>You begin climbing into the ventilation system...</span>")
visible_message("<span class='warning'>[src] begins to climb into the ventilation system!</span>","<span class='notice'>You begin climbing into the ventilation system...</span>")
if(vent_found.air_contents && !issilicon(src))
switch(vent_found.air_contents.temperature)
@@ -202,16 +202,16 @@ var/list/ventcrawl_machinery = list(
sight = (SEE_TURFS|BLIND)
else
src << "<span class='notice'>This vent is not connected to anything."
src << "<span class='notice'>This vent is not connected to anything.</span>"
else
src << "<span class='notice'>You must be standing on or beside an air vent to enter it."
src << "<span class='notice'>You must be standing on or beside an air vent to enter it.</span>"
else
src << "<span class='notice'>You can't vent crawl while you're stunned!"
src << "<span class='notice'>You can't vent crawl while you're stunned!</span>"
else
src << "<span class='notice'>You must be conscious to do this!"
src << "<span class='notice'>You must be conscious to do this!</span>"
return
/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/starting_machine)