Index: trunk/lib/FormValidator.inc.php
===================================================================
--- trunk/lib/FormValidator.inc.php	(revision 721)
+++ trunk/lib/FormValidator.inc.php	(revision 722)
@@ -67,4 +67,5 @@
         'notice' => ' sc-msg-notice ',
         'success' => ' sc-msg-success ',
+        'use_raise_msg' => false,
     );
 
@@ -151,4 +152,10 @@
     public function addError($form_name, $msg='', $type=MSG_ERR, $file=null, $line=null)
     {
+        $app =& App::getInstance();
+
+        if (true === $this->getParam('use_raise_msg')) {
+            $app->raiseMsg($msg, $type, $file, $line);
+        }
+
         $this->errors[] = array(
             'name' => $form_name,
Index: trunk/lib/Utilities.inc.php
===================================================================
--- trunk/lib/Utilities.inc.php	(revision 721)
+++ trunk/lib/Utilities.inc.php	(revision 722)
@@ -520,21 +520,4 @@
 }
 
-/*
-* Converts a string into a URL-safe slug, removing spaces and non word characters.
-*
-* @access   public
-* @param    string  $str    String to convert.
-* @return   string          URL-safe slug.
-* @author   Quinn Comendant <quinn@strangecode.com>
-* @version  1.0
-* @since    18 Aug 2014 12:54:29
-*/
-function URLSlug($str)
-{
-    $slug = preg_replace(array('/\W+/u', '/^-+|-+$/u'), array('-', ''), $str);
-    $slug = strtolower($slug);
-    return $slug;
-}
-
 /**
  * Return a human readable disk space measurement. Input value measured in bytes.
@@ -623,6 +606,53 @@
 }
 
-/**
- * Removes non-latin characters from file name, using htmlentities to convert known weirdos into regular squares.
+/*
+* Converts strange characters into ASCII using a htmlentities hack. If a character does not have a specific rule, it will remain as its entity name, e.g., `5Â¢` becomes `5&cent;` which becomes `5cent`.
+*
+* @access   public
+* @param    string  $str    Input string of text containing accents.
+* @return   string          String with accented characters converted to ASCII equivalents.
+* @author   Quinn Comendant <quinn@strangecode.com>
+* @since    30 Apr 2020 21:29:16
+*/
+function simplifyAccents($str)
+{
+    $app =& App::getInstance();
+
+    return preg_replace([
+        '/&amp;(?=[\w\d#]{1,10};)/ui',
+        '/&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml|caron);/ui',
+        '/&(?:ndash|mdash|horbar);/ui',
+        '/&(?:nbsp);/ui',
+        '/&(?:bdquo|ldquo|ldquor|lsquo|lsquor|rdquo|rdquor|rsquo|rsquor|sbquo|lsaquo|rsaquo);/ui',
+        '/&(?:amp);/ui', // This replacement must come after matching all other entities.
+        '/[&;]+/u',
+    ], [
+        '&',
+        '$1',
+        '-',
+        ' ',
+        '',
+        'and',
+        '',
+    ], htmlentities($str, ENT_NOQUOTES | ENT_IGNORE, $app->getParam('character_set')));
+}
+
+/*
+* Converts a string into a URL-safe slug, removing spaces and non word characters.
+*
+* @access   public
+* @param    string  $str    String to convert.
+* @return   string          URL-safe slug.
+* @author   Quinn Comendant <quinn@strangecode.com>
+* @version  1.0
+* @since    18 Aug 2014 12:54:29
+*/
+function URLSlug($str)
+{
+    return strtolower(urlencode(preg_replace(['/[-\sââ.:;?!@#=+_\/\\\]+|(?:&nbsp;|&#160;|&ndash;|&#8211;|&mdash;|&#8212;|%c2%a0|%e2%80%93|%e2%80%9)+/u', '/-+/u', '/[^\w-]+/u', '/^-+|-+$/u'], ['-', '-', '', ''], simplifyAccents($str))));
+}
+
+/**
+ * Converts a string of text into a safe file name by removing non-ASCII characters and non-word characters.
  *
  * @access  public
@@ -634,17 +664,5 @@
     $app =& App::getInstance();
 
-    $file_name = preg_replace(array(
-        '/&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml|caron);/ui',
-        '/&(?:amp);/ui',
-        '/[&;]+/u',
-        '/[^a-zA-Z0-9()@._=+-]+/u',
-        '/^_+|_+$/u'
-    ), array(
-        '$1',
-        'and',
-        '',
-        '_',
-        ''
-    ), htmlentities($file_name, ENT_NOQUOTES | ENT_IGNORE, $app->getParam('character_set')));
+    $file_name = preg_replace(['/[^a-zA-Z0-9()@._=+-]+/u', '/^_+|_+$/u'], ['_', ''], simplifyAccents($file_name));
     return mb_substr($file_name, 0, 250);
 }
