Automatically create hyperlink based on span class
You could do this in your field-template file. 

&lt;?php foreach($class in $classes)): ?&gt;
  &lt;?php if ($class == 'johns' ): ?&gt;
    // do something
  &lt;?php endif; ?&gt;
  &lt;?php if ($class == 'sarahs' ): ?&gt;
    // do something
  &lt;?php endif; ?&gt;
&lt;?php endforeach; ?&gt;


Downside this way is you need to maintain a list in the templatefile.