commit 1f623f01d1cdde3d2d0572d3f4ca7494bc7650cf
Author: Assos Assos <assos+forge@centrale-marseille.fr>
Date:   Wed Nov 2 22:46:18 2016 +0100

    Weekly update of contrib modules

diff --git a/drupal7/sites/all/modules/media/README.txt b/drupal7/sites/all/modules/media/README.txt
index 6875a072..7c1615b7 100644
--- a/drupal7/sites/all/modules/media/README.txt
+++ b/drupal7/sites/all/modules/media/README.txt
@@ -4,4 +4,25 @@
  *  README for the Media Module.
  */
 
-See http://drupal.org/node/356802
+See -https://www.drupal.org/documentation/modules/media
+
+Site Building Guide ->
+ \/ Media and files
+    \/ Media 
+- https://www.drupal.org/documentation/modules/media
+     > Media Internet Sources
+     . Media and file cleanup
+     . Media: YouTube upload
+     > Upgrading Media 7.x-1.x to 7.x-2.x
+     . Using existing files (FTP uploads etc)
+     . Media Installation and distributions
+     . Media 2.x Quick Start Guide
+     . Displaying Media
+     . Media Library
+     . Media Roadmap
+     > Media Recipes (custom FORM, developer recipes)
+     > Media Developer Documentation (Outdated)
+     > Media FAQ (Outdated)
+     . Media Vimeo Uploader  
+
+items preceded with a '>' indicate more available media module documentation sub categories
diff --git a/drupal7/sites/all/modules/media/media.info b/drupal7/sites/all/modules/media/media.info
index 8bea327f..20b1b23c 100644
--- a/drupal7/sites/all/modules/media/media.info
+++ b/drupal7/sites/all/modules/media/media.info
@@ -24,9 +24,9 @@ configure = admin/config/media/browser
 ; We have to add a fake version so Git checkouts do not fail Media dependencies
 version = 7.x-2.x-dev
 
-; Information added by Drupal.org packaging script on 2016-10-25
-version = "7.x-2.0-beta3"
+; Information added by Drupal.org packaging script on 2016-10-31
+version = "7.x-2.0-beta5"
 core = "7.x"
 project = "media"
-datestamp = "1477422289"
+datestamp = "1477886358"
 
diff --git a/drupal7/sites/all/modules/media/modules/media_bulk_upload/media_bulk_upload.info b/drupal7/sites/all/modules/media/modules/media_bulk_upload/media_bulk_upload.info
index 41fad60e..2e67d776 100644
--- a/drupal7/sites/all/modules/media/modules/media_bulk_upload/media_bulk_upload.info
+++ b/drupal7/sites/all/modules/media/modules/media_bulk_upload/media_bulk_upload.info
@@ -13,9 +13,9 @@ test_dependencies[] = plupload
 files[] = includes/MediaBrowserBulkUpload.inc
 files[] = tests/media_bulk_upload.test
 
-; Information added by Drupal.org packaging script on 2016-10-25
-version = "7.x-2.0-beta3"
+; Information added by Drupal.org packaging script on 2016-10-31
+version = "7.x-2.0-beta5"
 core = "7.x"
 project = "media"
-datestamp = "1477422289"
+datestamp = "1477886358"
 
diff --git a/drupal7/sites/all/modules/media/modules/media_internet/media_internet.info b/drupal7/sites/all/modules/media/modules/media_internet/media_internet.info
index 214d41fb..4293f0e9 100644
--- a/drupal7/sites/all/modules/media/modules/media_internet/media_internet.info
+++ b/drupal7/sites/all/modules/media/modules/media_internet/media_internet.info
@@ -12,9 +12,9 @@ files[] = includes/MediaInternetNoHandlerException.inc
 files[] = includes/MediaInternetValidationException.inc
 files[] = tests/media_internet.test
 
-; Information added by Drupal.org packaging script on 2016-10-25
-version = "7.x-2.0-beta3"
+; Information added by Drupal.org packaging script on 2016-10-31
+version = "7.x-2.0-beta5"
 core = "7.x"
 project = "media"
-datestamp = "1477422289"
+datestamp = "1477886358"
 
diff --git a/drupal7/sites/all/modules/media/modules/media_internet/tests/media_internet_test.info b/drupal7/sites/all/modules/media/modules/media_internet/tests/media_internet_test.info
index 11c6c4c4..02acf762 100644
--- a/drupal7/sites/all/modules/media/modules/media_internet/tests/media_internet_test.info
+++ b/drupal7/sites/all/modules/media/modules/media_internet/tests/media_internet_test.info
@@ -7,9 +7,9 @@ hidden = TRUE
 files[] = includes/MediaInternetTestStreamWrapper.inc
 files[] = includes/MediaInternetTestHandler.inc
 
-; Information added by Drupal.org packaging script on 2016-10-25
-version = "7.x-2.0-beta3"
+; Information added by Drupal.org packaging script on 2016-10-31
+version = "7.x-2.0-beta5"
 core = "7.x"
 project = "media"
-datestamp = "1477422289"
+datestamp = "1477886358"
 
diff --git a/drupal7/sites/all/modules/media/modules/media_migrate_file_types/media_migrate_file_types.info b/drupal7/sites/all/modules/media/modules/media_migrate_file_types/media_migrate_file_types.info
index a49dbe45..a2d13f29 100644
--- a/drupal7/sites/all/modules/media/modules/media_migrate_file_types/media_migrate_file_types.info
+++ b/drupal7/sites/all/modules/media/modules/media_migrate_file_types/media_migrate_file_types.info
@@ -8,9 +8,9 @@ dependencies[] = media
 
 configure = admin/structure/file-types/upgrade
 
-; Information added by Drupal.org packaging script on 2016-10-25
-version = "7.x-2.0-beta3"
+; Information added by Drupal.org packaging script on 2016-10-31
+version = "7.x-2.0-beta5"
 core = "7.x"
 project = "media"
-datestamp = "1477422289"
+datestamp = "1477886358"
 
diff --git a/drupal7/sites/all/modules/media/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc b/drupal7/sites/all/modules/media/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc
index 36cfb1bf..2afcfcda 100644
--- a/drupal7/sites/all/modules/media/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc
+++ b/drupal7/sites/all/modules/media/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc
@@ -12,7 +12,7 @@ define('MEDIA_WYSIWYG_TOKEN_REGEX', '/\[\[.*?\]\]/s');
  *
  * @TODO check for security probably pass text through filter_xss
  */
-function media_wysiwyg_filter($text, $filter, $format, $langcode, $cache, $cache_id) {
+function media_wysiwyg_filter($text, $filter = NULL, $format = NULL, $langcode = NULL, $cache = NULL, $cache_id = NULL) {
   $replacements = array();
   $patterns = array();
   $rendered_text = $text;
diff --git a/drupal7/sites/all/modules/media/modules/media_wysiwyg/js/media_wysiwyg.filter.js b/drupal7/sites/all/modules/media/modules/media_wysiwyg/js/media_wysiwyg.filter.js
index 80fc5dac..c16c29a5 100644
--- a/drupal7/sites/all/modules/media/modules/media_wysiwyg/js/media_wysiwyg.filter.js
+++ b/drupal7/sites/all/modules/media/modules/media_wysiwyg/js/media_wysiwyg.filter.js
@@ -231,8 +231,7 @@
 
       // Extract attributes represented by fields and use those values to keep
       // them in sync, usually alt and title.
-      info.fields = info.attributes;
-      var attributes = Drupal.media.filter.parseAttributeFields(info.attributes);
+      var attributes = Drupal.media.filter.parseAttributeFields(info.fields);
       info.attributes = $.extend(info.attributes, attributes);
 
       // Move attributes from the file info array to the placeholder element.
diff --git a/drupal7/sites/all/modules/media/modules/media_wysiwyg/media_wysiwyg.info b/drupal7/sites/all/modules/media/modules/media_wysiwyg/media_wysiwyg.info
index 71fd9cbe..fd255557 100644
--- a/drupal7/sites/all/modules/media/modules/media_wysiwyg/media_wysiwyg.info
+++ b/drupal7/sites/all/modules/media/modules/media_wysiwyg/media_wysiwyg.info
@@ -15,9 +15,9 @@ files[] = tests/media_wysiwyg.macro.test
 
 configure = admin/config/media/browser
 
-; Information added by Drupal.org packaging script on 2016-10-25
-version = "7.x-2.0-beta3"
+; Information added by Drupal.org packaging script on 2016-10-31
+version = "7.x-2.0-beta5"
 core = "7.x"
 project = "media"
-datestamp = "1477422289"
+datestamp = "1477886358"
 
diff --git a/drupal7/sites/all/modules/media/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.info b/drupal7/sites/all/modules/media/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.info
index 395f4750..5ac90054 100644
--- a/drupal7/sites/all/modules/media/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.info
+++ b/drupal7/sites/all/modules/media/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.info
@@ -5,9 +5,9 @@ core = 7.x
 dependencies[] = media_wysiwyg
 files[] = media_wysiwyg_view_mode.test
 
-; Information added by Drupal.org packaging script on 2016-10-25
-version = "7.x-2.0-beta3"
+; Information added by Drupal.org packaging script on 2016-10-31
+version = "7.x-2.0-beta5"
 core = "7.x"
 project = "media"
-datestamp = "1477422289"
+datestamp = "1477886358"
 
diff --git a/drupal7/sites/all/modules/media/modules/mediafield/mediafield.info b/drupal7/sites/all/modules/media/modules/mediafield/mediafield.info
index 0b7e599b..d2177285 100644
--- a/drupal7/sites/all/modules/media/modules/mediafield/mediafield.info
+++ b/drupal7/sites/all/modules/media/modules/mediafield/mediafield.info
@@ -4,9 +4,9 @@ package = Media
 core = 7.x
 dependencies[] = media
 
-; Information added by Drupal.org packaging script on 2016-10-25
-version = "7.x-2.0-beta3"
+; Information added by Drupal.org packaging script on 2016-10-31
+version = "7.x-2.0-beta5"
 core = "7.x"
 project = "media"
-datestamp = "1477422289"
+datestamp = "1477886358"
 
diff --git a/drupal7/sites/all/modules/media/tests/media_module_test.info b/drupal7/sites/all/modules/media/tests/media_module_test.info
index f1dce2d0..f0f4b92d 100644
--- a/drupal7/sites/all/modules/media/tests/media_module_test.info
+++ b/drupal7/sites/all/modules/media/tests/media_module_test.info
@@ -6,9 +6,9 @@ hidden = TRUE
 
 files[] = includes/MediaModuleTest.inc
 
-; Information added by Drupal.org packaging script on 2016-10-25
-version = "7.x-2.0-beta3"
+; Information added by Drupal.org packaging script on 2016-10-31
+version = "7.x-2.0-beta5"
 core = "7.x"
 project = "media"
-datestamp = "1477422289"
+datestamp = "1477886358"
 
diff --git a/drupal7/sites/all/modules/webform_validation/webform_validation.info b/drupal7/sites/all/modules/webform_validation/webform_validation.info
index 7b50e6f1..bd6f47c6 100644
--- a/drupal7/sites/all/modules/webform_validation/webform_validation.info
+++ b/drupal7/sites/all/modules/webform_validation/webform_validation.info
@@ -3,16 +3,11 @@ description = Add validation rules to Webforms.
 core = 7.x
 package = Webform
 dependencies[] = webform
-files[] = webform_validation.admin.inc
-files[] = webform_validation.install
-files[] = webform_validation.module
-files[] = webform_validation.rules.inc
-files[] = webform_validation.validators.inc
 php = 5.3
 
-; Information added by Drupal.org packaging script on 2016-02-17
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2016-10-31
+version = "7.x-1.12"
 core = "7.x"
 project = "webform_validation"
-datestamp = "1455735566"
+datestamp = "1477935543"
 
diff --git a/drupal7/sites/all/modules/webform_validation/webform_validation.module b/drupal7/sites/all/modules/webform_validation/webform_validation.module
index a1194afb..ed67caca 100644
--- a/drupal7/sites/all/modules/webform_validation/webform_validation.module
+++ b/drupal7/sites/all/modules/webform_validation/webform_validation.module
@@ -160,10 +160,16 @@ function webform_validation_validate($form, &$form_state) {
 
   if ($rules) {
     $component_definitions = webform_validation_prefix_keys($node->webform['components']);
+    $sorter = webform_get_conditional_sorter($node);
+    // If the form was retrieved from the form cache, the conditionals may not
+    // have been executed yet.
+    if (!$sorter->isExecuted()) {
+      $sorter->executeConditionals(array(), 0);
+    }
     // Remove hidden components.
     foreach ($component_definitions as $key => $component) {
       if (defined('WebformConditionals::componentShown')) {
-        if (webform_get_conditional_sorter($node)->componentVisibility($component['cid'], $component['page_num']) !== WebformConditionals::componentShown) {
+        if ($sorter->componentVisibility($component['cid'], $component['page_num']) !== WebformConditionals::componentShown) {
           unset($flat_values[$key]);
         }
       }
diff --git a/drupal7/sites/all/modules/webform_validation/webform_validation.validators.inc b/drupal7/sites/all/modules/webform_validation/webform_validation.validators.inc
index ac445619..0063b991 100644
--- a/drupal7/sites/all/modules/webform_validation/webform_validation.validators.inc
+++ b/drupal7/sites/all/modules/webform_validation/webform_validation.validators.inc
@@ -601,7 +601,7 @@ function webform_validation_webform_validation_validate($validator_name, $items,
         $entry[$count]['key'] = key($items);
         $value = array_shift($items);
         if ($components[$entry[$count]['key']]['type'] === 'date') {
-          if (checkdate((int) $value['month'], (int) $value['day'], (int) $value['year'])) {
+          if (!empty($value) && checkdate((int) $value['month'], (int) $value['day'], (int) $value['year'])) {
             $entry[$count]['value'] = date('Y-m-d', mktime(0, 0, 0, (int) $value['month'], (int) $value['day'], (int) $value['year']));
           }
           else {
@@ -927,16 +927,23 @@ function _webform_validation_test(&$errors, $key, $rule, $test, array $error_str
  * Count the number of words in a value.
  *
  * Strip HTML first.
+ *
+ * @param string|array $val
+ *   A string or array of strings in which to count words.
+ *
+ * @return int
+ *   The number of words in the input.
  */
 function _webform_validation_count_words($val) {
   $val = _webform_validation_flatten_array($val);
 
+  // Strip any HTML tags so they're not counted in the word count.
   $val = strip_tags($val);
-  // Replace entities representing spaces with actual spaces.
-  $val = str_replace('&nbsp;', ' ', $val);
-  $val = str_replace('&#160;', ' ', $val);
+  // Convert character entities back to characters. Without this, entities for
+  // whitespace characters would not be counted as word boundaries.
+  $val = html_entity_decode($val);
 
-  return str_word_count($val);
+  return count(preg_split('/[[:space:]\xC2\xA0]+/', $val));
 }
 
 /**
diff --git a/drupal7/sites/all/themes/bootstrap/bootstrap.info b/drupal7/sites/all/themes/bootstrap/bootstrap.info
index 640e4ca4..dc5a4197 100644
--- a/drupal7/sites/all/themes/bootstrap/bootstrap.info
+++ b/drupal7/sites/all/themes/bootstrap/bootstrap.info
@@ -208,9 +208,9 @@ multipliers[screen-md-max][] = 2x
 multipliers[screen-lg-min][] = 1.5x
 multipliers[screen-lg-min][] = 2x
 
-; Information added by Drupal.org packaging script on 2016-08-03
-version = "7.x-3.6"
+; Information added by Drupal.org packaging script on 2016-11-02
+version = "7.x-3.8"
 core = "7.x"
 project = "bootstrap"
-datestamp = "1470203941"
+datestamp = "1478114647"
 
diff --git a/drupal7/sites/all/themes/bootstrap/composer.json b/drupal7/sites/all/themes/bootstrap/composer.json
new file mode 100644
index 00000000..0c1dcf9c
--- /dev/null
+++ b/drupal7/sites/all/themes/bootstrap/composer.json
@@ -0,0 +1,30 @@
+{
+  "name": "drupal/bootstrap",
+  "description": "Built to use Bootstrap, a sleek, intuitive, and powerful front-end framework for faster and easier web development.",
+  "type": "drupal-theme",
+  "license": "GPL-2.0",
+  "homepage": "http://drupal.org/project/bootstrap",
+  "authors": [
+    {
+      "name": "Mark Carver (markcarver)",
+      "homepage": "https://www.drupal.org/u/markcarver",
+      "role": "Maintainer"
+    },
+    {
+      "name": "John McCormick (neardark)",
+      "homepage": "https://www.drupal.org/u/neardark",
+      "role": "Co-maintainer"
+    },
+    {
+      "name": "Fabiano Sant'Ana (wundo)",
+      "homepage": "https://www.drupal.org/u/wundo",
+      "role": "Co-maintainer"
+    }
+  ],
+  "support": {
+    "docs": "http://drupal-bootstrap.org",
+    "issues": "https://www.drupal.org/project/issues/bootstrap",
+    "irc": "irc://irc.freenode.org/drupal-bootstrap",
+    "source": "http://cgit.drupalcode.org/bootstrap"
+  }
+}
diff --git a/drupal7/sites/all/themes/bootstrap/docs/README.md b/drupal7/sites/all/themes/bootstrap/docs/README.md
index 247db944..0c727b87 100644
--- a/drupal7/sites/all/themes/bootstrap/docs/README.md
+++ b/drupal7/sites/all/themes/bootstrap/docs/README.md
@@ -24,7 +24,8 @@ a base theme like this.
 - @link subtheme_settings Theme Settings @endlink
 - @link subtheme_helper_functions Helper Functions @endlink
 - @link subtheme_cdn CDN Starterkit @endlink
-- @link subtheme_less LESS Starterkit @endlink
+- @link subtheme_less Less Starterkit @endlink
+- @link subtheme_sass Sass Starterkit @endlink
 
 #### @link registry Theme Registry @endlink
 - @link theme_preprocess Preprocess Functions (.vars.php) @endlink
diff --git a/drupal7/sites/all/themes/bootstrap/docs/subtheme/README.md b/drupal7/sites/all/themes/bootstrap/docs/subtheme/README.md
index 4a02aa3a..b3db19a5 100644
--- a/drupal7/sites/all/themes/bootstrap/docs/subtheme/README.md
+++ b/drupal7/sites/all/themes/bootstrap/docs/subtheme/README.md
@@ -22,8 +22,10 @@ topic will focus on the two primarily and most common ways.
 
 - @link subtheme_cdn CDN Starterkit @endlink - uses the "out-of-the-box"
   CSS and JavaScript files served by the [jsDelivr CDN].
-- @link subtheme_less LESS Starterkit @endlink - uses the [Bootstrap Framework]
-  [LESS] source files and a local [LESS] preprocessor.
+- @link subtheme_less Less Starterkit @endlink - uses the [Bootstrap Framework]
+  source files and a local [Less] preprocessor.
+- @link subtheme_sass Sass Starterkit @endlink - uses the [Bootstrap Framework]
+  source files and a local [Sass] preprocessor.
 
 #### Create a New Sub-theme {#create}
 
@@ -56,4 +58,5 @@ for additional documentation pertaining to the chosen Starterkit.
 [Drupal Bootstrap]: https://www.drupal.org/project/bootstrap
 [Bootstrap Framework]: http://getbootstrap.com
 [jsDelivr CDN]: http://www.jsdelivr.com
-[LESS]: http://lesscss.org
+[Less]: http://lesscss.org
+[Sass]: http://sass-lang.com
diff --git a/drupal7/sites/all/themes/bootstrap/includes/common.inc b/drupal7/sites/all/themes/bootstrap/includes/common.inc
index 68cfce9c..8b574160 100644
--- a/drupal7/sites/all/themes/bootstrap/includes/common.inc
+++ b/drupal7/sites/all/themes/bootstrap/includes/common.inc
@@ -575,6 +575,50 @@ function _bootstrap_file_scan_directory($dir, $mask, array $options = array()) {
   return $files[$hash];
 }
 
+/**
+ * Filters HTML to prevent cross-site-scripting (XSS) vulnerabilities.
+ *
+ * Very similar to core's filter_xss(). It does, however, include the addition
+ * of the "span", "div" and "i" elements which are commonly used in Bootstrap.
+ *
+ * @param string $string
+ *   The string with raw HTML in it. It will be stripped of everything that can
+ *   cause an XSS attack.
+ * @param array $allowed_tags
+ *   An array of allowed tags.
+ *
+ * @return string
+ *   An XSS safe version of $string, or an empty string if $string is not
+ *   valid UTF-8.
+ *
+ * @see filter_xss()
+ */
+function _bootstrap_filter_xss($string, array $allowed_tags = NULL) {
+  if (is_null($allowed_tags)) {
+    $allowed_tags = array(
+      // Inline elements.
+      'a',
+      'cite',
+      'em',
+      'i',
+      'span',
+      'strong',
+
+      // Block elements.
+      'blockquote',
+      'code',
+      'div',
+      'ul',
+      'ol',
+      'li',
+      'dl',
+      'dt',
+      'dd',
+    );
+  }
+  return filter_xss($string, $allowed_tags);
+}
+
 /**
  * Returns a list of available Bootstrap Glyphicons.
  *
@@ -1058,6 +1102,7 @@ function _bootstrap_colorize_text($string, $default = '') {
         t('Filter')             => 'primary',
         t('Submit')             => 'primary',
         t('Search')             => 'primary',
+        t('Log in')             => 'primary',
 
         // Success class.
         t('Add')                => 'success',
@@ -1156,6 +1201,7 @@ function _bootstrap_iconize_text($string, $default = '') {
         t('Delete')     => 'trash',
         t('Remove')     => 'trash',
         t('Upload')     => 'upload',
+        t('Log In')     => 'log-in',
       ),
     );
 
diff --git a/drupal7/sites/all/themes/bootstrap/js/modules/ctools/js/modal.js b/drupal7/sites/all/themes/bootstrap/js/modules/ctools/js/modal.js
index 2e294506..a0f11252 100644
--- a/drupal7/sites/all/themes/bootstrap/js/modules/ctools/js/modal.js
+++ b/drupal7/sites/all/themes/bootstrap/js/modules/ctools/js/modal.js
@@ -39,7 +39,8 @@
       modalOptions: {
         opacity: 0.55,
         background: '#fff'
-      }
+      },
+      modalClass: 'default'
     };
 
     var settings = {};
@@ -99,8 +100,8 @@
     resize();
 
     $('.modal-title', Drupal.CTools.Modal.modal).html(Drupal.CTools.Modal.currentSettings.loadingText);
-    Drupal.CTools.Modal.modalContent(Drupal.CTools.Modal.modal, settings.modalOptions, settings.animation, settings.animationSpeed);
-    $('#modalContent .modal-body').html(Drupal.theme(settings.throbberTheme));
+    Drupal.CTools.Modal.modalContent(Drupal.CTools.Modal.modal, settings.modalOptions, settings.animation, settings.animationSpeed, settings.modalClass);
+    $('#modalContent .modal-body').html(Drupal.theme(settings.throbberTheme)).addClass('ctools-modal-loading');
   };
 
   /**
diff --git a/drupal7/sites/all/themes/bootstrap/starterkits/less/README.md b/drupal7/sites/all/themes/bootstrap/starterkits/less/README.md
index bd3030cf..187ec2b1 100644
--- a/drupal7/sites/all/themes/bootstrap/starterkits/less/README.md
+++ b/drupal7/sites/all/themes/bootstrap/starterkits/less/README.md
@@ -11,7 +11,7 @@ preprocessor.
 - [Overrides](#overrides)
 
 ## Prerequisites
-- Read the @link getting_started Getting Started @endlink documentation topic.
+- Read the @link getting_started Getting Started @endlink and @link subtheme Sub-theming @endlink documentation topics.
 - You must understand the basic concept of using the [Less] CSS pre-processor.
 - You must use a **[local Less compiler](https://www.google.com/search?q=less+compiler)**.
 - You must use the [Bootstrap Framework Source Files] ending in the `.less`
diff --git a/drupal7/sites/all/themes/bootstrap/starterkits/sass/README.md b/drupal7/sites/all/themes/bootstrap/starterkits/sass/README.md
index 1b6cfc74..c23b0997 100644
--- a/drupal7/sites/all/themes/bootstrap/starterkits/sass/README.md
+++ b/drupal7/sites/all/themes/bootstrap/starterkits/sass/README.md
@@ -1,6 +1,6 @@
 <!-- @file Instructions for subtheming using the Sass Starterkit. -->
-<!-- @defgroup sub_theming_sass -->
-<!-- @ingroup sub_theming -->
+<!-- @defgroup subtheme_sass -->
+<!-- @ingroup subtheme -->
 # Sass Starterkit
 
 Below are instructions on how to create a Bootstrap sub-theme using a Sass
@@ -11,7 +11,7 @@ preprocessor.
 - [Overrides](#overrides)
 
 ## Prerequisites
-- Read the @link getting_started Getting Started @endlink documentation topic.
+- Read the @link getting_started Getting Started @endlink and @link subtheme Sub-theming @endlink documentation topics.
 - You must understand the basic concept of using the [Sass] CSS pre-processor.
 - You must use a **[local Sass compiler](https://www.google.com/search?q=sass+compiler)**.
 - You must use the [Bootstrap Framework Source Files] ending in the `.scss`
@@ -50,7 +50,7 @@ name, using a different extension of course).
 
 #### See also:
 - @link templates Templates @endlink
-- @link theme_settings Theme Settings @endlink
+- @link subtheme_settings Theme Settings @endlink
 - @link registry Theme Registry @endlink
 
 [Bootstrap Framework]: http://getbootstrap.com
diff --git a/drupal7/sites/all/themes/bootstrap/templates/block/block.vars.php b/drupal7/sites/all/themes/bootstrap/templates/block/block.vars.php
index 355e18db..024244f2 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/block/block.vars.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/block/block.vars.php
@@ -36,4 +36,5 @@ function bootstrap_process_block(&$variables) {
   if (!isset($variables['title'])) {
     $variables['title'] = $variables['block']->subject;
   }
+  $variables['title'] = _bootstrap_filter_xss($variables['title']);
 }
diff --git a/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-carousel.tpl.php b/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-carousel.tpl.php
index ff5abeeb..2ed07eac 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-carousel.tpl.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-carousel.tpl.php
@@ -23,10 +23,10 @@
         <?php if ($item['title'] || $item['description']): ?>
           <div class="carousel-caption">
             <?php if ($item['title']): ?>
-              <h3><?php print render($item['title']); ?></h3>
+              <h3><?php print $item['title']; ?></h3>
             <?php endif; ?>
             <?php if ($item['description']): ?>
-              <p><?php print render($item['description']); ?></p>
+              <p><?php print $item['description']; ?></p>
             <?php endif; ?>
           </div>
         <?php endif; ?>
diff --git a/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-carousel.vars.php b/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-carousel.vars.php
index 35eb4ff5..66c1ed28 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-carousel.vars.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-carousel.vars.php
@@ -64,5 +64,14 @@ function bootstrap_process_bootstrap_carousel(&$variables) {
       'description' => NULL,
       'url' => NULL,
     );
+
+    if (!empty($variables['items'][$delta]['title'])) {
+      $variables['items'][$delta]['title'] = _bootstrap_filter_xss(render($item['title']));
+    }
+
+    if (!empty($variables['items'][$delta]['description'])) {
+      $variables['items'][$delta]['description'] = _bootstrap_filter_xss(render($item['description']));
+    }
+
   }
 }
diff --git a/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-dropdown.vars.php b/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-dropdown.vars.php
index 0ffb5cb6..32378e1e 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-dropdown.vars.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-dropdown.vars.php
@@ -35,7 +35,7 @@ function bootstrap_preprocess_bootstrap_dropdown(&$variables) {
     if (is_string($element['#toggle'])) {
       $element['#toggle'] = array(
         '#theme' => 'link__bootstrap_dropdown__toggle',
-        '#text' => $element['#toggle'],
+        '#text' => _bootstrap_filter_xss($element['#toggle']),
         '#path' => '#',
         '#options' => array(
           'attributes' => array(),
diff --git a/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-modal.vars.php b/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-modal.vars.php
index 8c60d8e3..a5e32561 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-modal.vars.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-modal.vars.php
@@ -45,6 +45,7 @@ function bootstrap_preprocess_bootstrap_modal(&$variables) {
 function bootstrap_process_bootstrap_modal(&$variables) {
   $variables['attributes'] = drupal_attributes($variables['attributes']);
   $variables['dialog_attributes'] = drupal_attributes($variables['dialog_attributes']);
+  $variables['heading'] = _bootstrap_filter_xss(render($variables['heading']));
   $variables['body'] = render($variables['body']);
   $variables['footer'] = render($variables['footer']);
 }
diff --git a/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-panel.vars.php b/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-panel.vars.php
index 8d2c50c2..fe8440a2 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-panel.vars.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-panel.vars.php
@@ -86,4 +86,10 @@ function bootstrap_preprocess_bootstrap_panel(&$variables) {
  */
 function bootstrap_process_bootstrap_panel(&$variables) {
   $variables['attributes'] = drupal_attributes($variables['attributes']);
+  if (!empty($variables['title'])) {
+    $variables['title'] = _bootstrap_filter_xss(render($variables['title']));
+  }
+  if (!empty($variables['description'])) {
+    $variables['description'] = _bootstrap_filter_xss(render($variables['description']));
+  }
 }
diff --git a/drupal7/sites/all/themes/bootstrap/templates/menu/menu-link.func.php b/drupal7/sites/all/themes/bootstrap/templates/menu/menu-link.func.php
index a947cc72..05532cb4 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/menu/menu-link.func.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/menu/menu-link.func.php
@@ -22,6 +22,11 @@ function bootstrap_menu_link(array $variables) {
   $element = $variables['element'];
   $sub_menu = '';
 
+  $title = $element['#title'];
+  $href = $element['#href'];
+  $options = !empty($element['#localized_options']) ? $element['#localized_options'] : array();
+  $attributes = !empty($element['#attributes']) ? $element['#attributes'] : array();
+
   if ($element['#below']) {
     // Prevent dropdown functions from being added to management menu so it
     // does not affect the navbar module.
@@ -32,25 +37,28 @@ function bootstrap_menu_link(array $variables) {
       // Add our own wrapper.
       unset($element['#below']['#theme_wrappers']);
       $sub_menu = '<ul class="dropdown-menu">' . drupal_render($element['#below']) . '</ul>';
+
       // Generate as standard dropdown.
-      $element['#title'] .= ' <span class="caret"></span>';
-      $element['#attributes']['class'][] = 'dropdown';
-      $element['#localized_options']['html'] = TRUE;
+      $title .= ' <span class="caret"></span>';
+      $attributes['class'][] = 'dropdown';
+
+      $options['html'] = TRUE;
 
       // Set dropdown trigger element to # to prevent inadvertant page loading
       // when a submenu link is clicked.
-      $element['#localized_options']['attributes']['data-target'] = '#';
-      $element['#localized_options']['attributes']['class'][] = 'dropdown-toggle';
-      $element['#localized_options']['attributes']['data-toggle'] = 'dropdown';
+      $options['attributes']['data-target'] = '#';
+      $options['attributes']['class'][] = 'dropdown-toggle';
+      $options['attributes']['data-toggle'] = 'dropdown';
     }
   }
-  // On primary navigation menu, class 'active' is not set on active menu item.
-  // @see https://drupal.org/node/1896674
-  if (($element['#href'] == $_GET['q'] || ($element['#href'] == '<front>' && drupal_is_front_page())) && (empty($element['#localized_options']['language']))) {
-    $element['#attributes']['class'][] = 'active';
+
+  // Filter the title if the "html" is set, otherwise l() will automatically
+  // sanitize using check_plain(), so no need to call that here.
+  if (!empty($options['html'])) {
+    $title = _bootstrap_filter_xss($title);
   }
-  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
-  return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n";
+
+  return '<li' . drupal_attributes($attributes) . '>' . l($title, $href, $options) . $sub_menu . "</li>\n";
 }
 
 /**
@@ -59,21 +67,39 @@ function bootstrap_menu_link(array $variables) {
 function bootstrap_menu_link__book_toc(array $variables) {
   $element = $variables['element'];
   $sub_menu = drupal_render($element['#below']);
-  $element['#attributes']['role'] = 'presentation';
+
+  $title = $element['#title'];
+  $href = $element['#href'];
+  $options = !empty($element['#localized_options']) ? $element['#localized_options'] : array();
+  $attributes = !empty($element['#attributes']) ? $element['#attributes'] : array();
+  $attributes['role'] = 'presentation';
+
+  // Header.
   $link = TRUE;
-  if ($element['#title'] && $element['#href'] === FALSE) {
-    $element['#attributes']['class'][] = 'dropdown-header';
+  if ($title && $href === FALSE) {
+    $attributes['class'][] = 'dropdown-header';
     $link = FALSE;
   }
-  elseif ($element['#title'] === FALSE && $element['#href'] === FALSE) {
-    $element['#attributes']['class'][] = 'divider';
+  // Divider.
+  elseif ($title === FALSE && $href === FALSE) {
+    $attributes['class'][] = 'divider';
     $link = FALSE;
   }
-  elseif (($element['#href'] == $_GET['q'] || ($element['#href'] == '<front>' && drupal_is_front_page())) && (empty($element['#localized_options']['language']))) {
-    $element['#attributes']['class'][] = 'active';
+  // Active.
+  elseif (($href == $_GET['q'] || ($href == '<front>' && drupal_is_front_page())) && (empty($options['language']))) {
+    $attributes['class'][] = 'active';
+  }
+
+  // Filter the title if the "html" is set, otherwise l() will automatically
+  // sanitize using check_plain(), so no need to call that here.
+  if (!empty($options['html'])) {
+    $title = _bootstrap_filter_xss($title);
   }
+
+  // Convert to a link.
   if ($link) {
-    $element['#title'] = l($element['#title'], $element['#href'], $element['#localized_options']);
+    $title = l($title, $href, $options);
   }
-  return '<li' . drupal_attributes($element['#attributes']) . '>' . $element['#title'] . $sub_menu . "</li>\n";
+
+  return '<li' . drupal_attributes($attributes) . '>' . $title . $sub_menu . "</li>\n";
 }
diff --git a/drupal7/sites/all/themes/bootstrap/templates/menu/menu-link.vars.php b/drupal7/sites/all/themes/bootstrap/templates/menu/menu-link.vars.php
new file mode 100644
index 00000000..d2c6fedf
--- /dev/null
+++ b/drupal7/sites/all/themes/bootstrap/templates/menu/menu-link.vars.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * @file
+ * Stub file for "menu_link" theme hook [pre]process functions.
+ */
+
+/**
+ * Pre-processes variables for the "menu_link" theme hook.
+ *
+ * See theme function for list of available variables.
+ *
+ * @see bootstrap_menu_link()
+ * @see theme_menu_link()
+ *
+ * @ingroup theme_preprocess
+ */
+function bootstrap_preprocess_menu_link(array &$variables) {
+  $element = &$variables['element'];
+
+  // Determine if the link should be shown as "active" based on the current
+  // active trail (set by core/contrib modules).
+  // @see https://www.drupal.org/node/2618828
+  // @see https://www.drupal.org/node/1896674
+  if (in_array('active-trail', _bootstrap_get_classes($element)) || ($element['#href'] == '<front>' && drupal_is_front_page())) {
+    $element['#attributes']['class'][] = 'active';
+  }
+}
diff --git a/drupal7/sites/all/themes/bootstrap/templates/menu/menu-local-action.func.php b/drupal7/sites/all/themes/bootstrap/templates/menu/menu-local-action.func.php
index 6945481e..19f269bc 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/menu/menu-local-action.func.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/menu/menu-local-action.func.php
@@ -22,21 +22,15 @@
  */
 function bootstrap_menu_local_action($variables) {
   $link = $variables['element']['#link'];
-
+  $title = $link['title'];
+  $icon = _bootstrap_iconize_text($title);
+  $href = !empty($link['href']) ? $link['href'] : FALSE;
   $options = isset($link['localized_options']) ? $link['localized_options'] : array();
 
-  // If the title is not HTML, sanitize it.
-  if (empty($options['html'])) {
-    $link['title'] = check_plain($link['title']);
-  }
-
-  $icon = _bootstrap_iconize_text($link['title']);
-
   // Format the action link.
-  $output = '';
-  if (isset($link['href'])) {
+  if ($href) {
     // Turn link into a mini-button and colorize based on title.
-    if ($class = _bootstrap_colorize_text($link['title'])) {
+    if ($class = _bootstrap_colorize_text($title)) {
       if (!isset($options['attributes']['class'])) {
         $options['attributes']['class'] = array();
       }
@@ -53,11 +47,13 @@ function bootstrap_menu_local_action($variables) {
     }
     // Force HTML so we can render any icon that may have been added.
     $options['html'] = !empty($options['html']) || !empty($icon) ? TRUE : FALSE;
-    $output .= l($icon . $link['title'], $link['href'], $options);
   }
-  else {
-    $output .= $icon . $link['title'];
+
+  // Filter the title if the "html" is set, otherwise l() will automatically
+  // sanitize using check_plain(), so no need to call that here.
+  if (!empty($options['html'])) {
+    $title = _bootstrap_filter_xss($title);
   }
 
-  return $output;
+  return $href ? l($icon . $title, $href, $options) : $icon . $title;
 }
diff --git a/drupal7/sites/all/themes/bootstrap/templates/menu/menu-local-task.func.php b/drupal7/sites/all/themes/bootstrap/templates/menu/menu-local-task.func.php
index f134577e..92a362ca 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/menu/menu-local-task.func.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/menu/menu-local-task.func.php
@@ -23,23 +23,27 @@
  */
 function bootstrap_menu_local_task($variables) {
   $link = $variables['element']['#link'];
-  $link_text = $link['title'];
+
+  $options = isset($link['localized_options']) ? $link['localized_options'] : array();
+  $title = $link['title'];
+  $href = $link['href'];
   $attributes = array();
 
+  // Add text to indicate active tab for non-visual users.
   if (!empty($variables['element']['#active'])) {
-    // Add text to indicate active tab for non-visual users.
-    $active = '<span class="element-invisible">' . t('(active tab)') . '</span>';
-
-    // If the link does not contain HTML already, check_plain() it now.
-    // After we set 'html'=TRUE the link will not be sanitized by l().
-    if (empty($link['localized_options']['html'])) {
-      $link['title'] = check_plain($link['title']);
-    }
-    $link['localized_options']['html'] = TRUE;
-    $link_text = t('!local-task-title!active', array('!local-task-title' => $link['title'], '!active' => $active));
-
+    $options['html'] = TRUE;
     $attributes['class'][] = 'active';
+    $title = t('!local-task-title!active', array(
+      '!local-task-title' => $title,
+      '!active' => '<span class="element-invisible">' . t('(active tab)') . '</span>',
+    ));
+  }
+
+  // Filter the title if the "html" is set, otherwise l() will automatically
+  // sanitize using check_plain(), so no need to call that here.
+  if (!empty($options['html'])) {
+    $title = _bootstrap_filter_xss($title);
   }
 
-  return '<li' . drupal_attributes($attributes) . '>' . l($link_text, $link['href'], $link['localized_options']) . "</li>\n";
+  return '<li' . drupal_attributes($attributes) . '>' . l($title, $href, $options) . "</li>\n";
 }
diff --git a/drupal7/sites/all/themes/bootstrap/templates/system/button.func.php b/drupal7/sites/all/themes/bootstrap/templates/system/button.func.php
index 24c4d9f9..413856f9 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/system/button.func.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/system/button.func.php
@@ -38,5 +38,5 @@ function bootstrap_button($variables) {
   }
 
   // This line break adds inherent margin between multiple buttons.
-  return '<button' . drupal_attributes($element['#attributes']) . '>' . $text . "</button>\n";
+  return '<button' . drupal_attributes($element['#attributes']) . '>' . _bootstrap_filter_xss($text) . "</button>\n";
 }
diff --git a/drupal7/sites/all/themes/bootstrap/templates/system/form-element.func.php b/drupal7/sites/all/themes/bootstrap/templates/system/form-element.func.php
index 1ba09e0f..f15b3b63 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/system/form-element.func.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/system/form-element.func.php
@@ -80,7 +80,7 @@ function bootstrap_form_element(&$variables) {
   }
 
   // Check for errors and set correct error class.
-  if ((isset($element['#parents']) && form_get_error($element)) || (!empty($element['#required']) && bootstrap_setting('forms_required_has_error'))) {
+  if ((isset($element['#parents']) && form_get_error($element) !== NULL) || (!empty($element['#required']) && bootstrap_setting('forms_required_has_error'))) {
     $wrapper_attributes['class'][] = 'has-error';
   }
 
@@ -156,7 +156,7 @@ function bootstrap_form_element(&$variables) {
       '#attributes' => array(
         'class' => array('help-block'),
       ),
-      '#weight' => isset($element['#description_display']) && $element['#description_display'] === 'before' ? 0 : 2,
+      '#weight' => isset($element['#description_display']) && $element['#description_display'] === 'before' ? 0 : 20,
       0 => array('#markup' => filter_xss_admin($element['#description'])),
     );
   }
diff --git a/drupal7/sites/all/themes/bootstrap/templates/system/item-list.func.php b/drupal7/sites/all/themes/bootstrap/templates/system/item-list.func.php
index 1980e49a..e30bb70e 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/system/item-list.func.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/system/item-list.func.php
@@ -57,7 +57,7 @@ function bootstrap_item_list($variables) {
     // Heading outputs only when it has text.
     if (!empty($title['text'])) {
       $heading .= '<' . $title['level'] . drupal_attributes($title['attributes']) . '>';
-      $heading .= empty($title['html']) ? check_plain($title['text']) : $title['text'];
+      $heading .= empty($title['html']) ? check_plain($title['text']) : _bootstrap_filter_xss($title['text']);
       $heading .= '</' . $title['level'] . '>';
     }
   }
diff --git a/drupal7/sites/all/themes/bootstrap/templates/system/page.tpl.php b/drupal7/sites/all/themes/bootstrap/templates/system/page.tpl.php
index 5937db7f..d31810c8 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/system/page.tpl.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/system/page.tpl.php
@@ -87,7 +87,7 @@
       <?php endif; ?>
 
       <?php if (!empty($primary_nav) || !empty($secondary_nav) || !empty($page['navigation'])): ?>
-        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
+        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
           <span class="sr-only"><?php print t('Toggle navigation'); ?></span>
           <span class="icon-bar"></span>
           <span class="icon-bar"></span>
@@ -97,7 +97,7 @@
     </div>
 
     <?php if (!empty($primary_nav) || !empty($secondary_nav) || !empty($page['navigation'])): ?>
-      <div class="navbar-collapse collapse">
+      <div class="navbar-collapse collapse" id="navbar-collapse">
         <nav role="navigation">
           <?php if (!empty($primary_nav)): ?>
             <?php print render($primary_nav); ?>
diff --git a/drupal7/sites/all/themes/bootstrap/templates/system/progress-bar.vars.php b/drupal7/sites/all/themes/bootstrap/templates/system/progress-bar.vars.php
new file mode 100644
index 00000000..4bf2be7b
--- /dev/null
+++ b/drupal7/sites/all/themes/bootstrap/templates/system/progress-bar.vars.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * @file
+ * Stub file for "progress_bar" theme hook [pre]process functions.
+ */
+
+/**
+ * Processes variables for the "progress_bar" theme hook.
+ *
+ * See template for list of available variables.
+ *
+ * @see progress-bar.tpl.php
+ *
+ * @ingroup theme_process
+ */
+function bootstrap_process_progress_bar(&$variables) {
+  $variables['percent'] = check_plain($variables['percent']);
+  $variables['message'] = _bootstrap_filter_xss($variables['message']);
+}
diff --git a/drupal7/sites/all/themes/bootstrap/templates/system/status-messages.func.php b/drupal7/sites/all/themes/bootstrap/templates/system/status-messages.func.php
index 3fd24aa7..5afee89a 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/system/status-messages.func.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/system/status-messages.func.php
@@ -60,13 +60,13 @@ function bootstrap_status_messages($variables) {
     $output .= "  <a class=\"close\" data-dismiss=\"alert\" href=\"#\">&times;</a>\n";
 
     if (!empty($status_heading[$type])) {
-      $output .= '<h4 class="element-invisible">' . $status_heading[$type] . "</h4>\n";
+      $output .= '<h4 class="element-invisible">' . _bootstrap_filter_xss($status_heading[$type]) . "</h4>\n";
     }
 
     if (count($messages) > 1) {
       $output .= " <ul>\n";
       foreach ($messages as $message) {
-        $output .= '  <li>' . $message . "</li>\n";
+        $output .= '  <li>' . _bootstrap_filter_xss($message) . "</li>\n";
       }
       $output .= " </ul>\n";
     }
diff --git a/drupal7/sites/all/themes/bootstrap/templates/webform/webform-element.func.php b/drupal7/sites/all/themes/bootstrap/templates/webform/webform-element.func.php
index efeeb5f2..f2f11d49 100644
--- a/drupal7/sites/all/themes/bootstrap/templates/webform/webform-element.func.php
+++ b/drupal7/sites/all/themes/bootstrap/templates/webform/webform-element.func.php
@@ -14,7 +14,7 @@ function bootstrap_webform_element(&$variables) {
   $element = &$variables['element'];
 
   // Inline title.
-  if ($element['#title_display'] === 'inline') {
+  if (isset($element['#title_display']) && $element['#title_display'] === 'inline') {
     $element['#title_display'] = 'before';
     $element['#wrapper_attributes']['class'][] = 'form-inline';
   }
@@ -29,7 +29,6 @@ function bootstrap_webform_element(&$variables) {
     $element['#input_group'] = TRUE;
   }
 
-  // Render with bootstrap_form_element().
-  bootstrap_include('bootstrap', 'templates/system/form-element.func.php');
-  return bootstrap_form_element($variables);
+  // Render as a normal "form_element" theme hook.
+  return theme('form_element', $variables);
 }
