Ticket #1279 (closed defect (bug): fixed)

Opened 7 years ago

Last modified 5 years ago

smilies fire when you write about RDF

Reported by: Denis de Bernardy Owned by: anonymous
Priority: normal Milestone: 2.1
Component: Administration Version: 1.5.1
Severity: minor Keywords:
Cc:

Description

if you write about:

:Dog rdf:type rdfs:Class :Fido rdf:type :Dog :name rdf:type rdf:Property :Fido :name "Fido" :Dog rdfs:subClassOf :Animal

:Dog triggers a smiley.

To fix, use the following array in vars.php lines 40-89:

if the config file does not provide the smilies array, let's define it here if (!isset($wpsmiliestrans)) {

$wpsmiliestrans = array( '\b:)\b' => 'icon_smile.gif', '\b:D\b' => 'icon_biggrin.gif', '\b:-D\b' => 'icon_biggrin.gif', '\b:grin:\b' => 'icon_biggrin.gif', '\b:)\b' => 'icon_smile.gif', '\b:-)\b' => 'icon_smile.gif', '\b:smile:\b' => 'icon_smile.gif', '\b:(\b' => 'icon_sad.gif', '\b:-(\b' => 'icon_sad.gif', '\b:sad:\b' => 'icon_sad.gif', '\b:o\b' => 'icon_surprised.gif', '\b:-o\b' => 'icon_surprised.gif', '\b:eek:\b' => 'icon_surprised.gif', '\b8O\b' => 'icon_eek.gif', '\b8-O\b' => 'icon_eek.gif', '\b:shock:\b' => 'icon_eek.gif', '\b:?\b' => 'icon_confused.gif', '\b:-?\b' => 'icon_confused.gif', '\b:???:\b' => 'icon_confused.gif', '\b8)\b' => 'icon_cool.gif', '\b8-)\b' => 'icon_cool.gif', '\b:cool:\b' => 'icon_cool.gif', '\b:lol:\b' => 'icon_lol.gif', '\b:x\b' => 'icon_mad.gif', '\b:-x\b' => 'icon_mad.gif', '\b:mad:\b' => 'icon_mad.gif', '\b:P\b' => 'icon_razz.gif', '\b:-P\b' => 'icon_razz.gif', '\b:razz:\b' => 'icon_razz.gif', '\b:oops:\b' => 'icon_redface.gif', '\b:cry:\b' => 'icon_cry.gif', '\b:evil:\b' => 'icon_evil.gif', '\b:twisted:\b' => 'icon_twisted.gif', '\b:roll:\b' => 'icon_rolleyes.gif', '\b:wink:\b' => 'icon_wink.gif', '\b;)\b' => 'icon_wink.gif', '\b;-)\b' => 'icon_wink.gif', '\b:!:\b' => 'icon_exclaim.gif', '\b:?:\b' => 'icon_question.gif', '\b:idea:\b' => 'icon_idea.gif', '\b:arrow:\b' => 'icon_arrow.gif', '\b:|\b' => 'icon_neutral.gif', '\b:-|\b' => 'icon_neutral.gif', '\b:neutral:\b' => 'icon_neutral.gif', '\b:mrgreen:\b' => 'icon_mrgreen.gif', );

}

Change History

  • Patch set to No

actually, the above does NOT solve it: it prevents :Dog to be turned into a smiley, but it introduces a bug in that ;) will no longer be turned into a smiley either. :|

So the bug stands unsolved: the :D in :Dog gets turned into a smiley.

Perhaps a better option would be for the user to simply disable smileys on a per-post basis as and when needed to prevent such accidental smiley occurrence.

  • Milestone set to 2.1

A fix for this is included in my patch for #2444.

comment:5   ryan5 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [4283]) Smiley parsing fixes from Nazgul. fixes #2444 #1279

Note: See TracTickets for help on using tickets.