Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Strict comparison of iconType.
  • Loading branch information
joedolson committed Aug 11, 2025
commit 2ac07cff6b511082fe724ac512eb08ef5f6b11ca
2 changes: 1 addition & 1 deletion build/ableplayer.dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ var AblePlayerInstances = [];
this.forceIconType = false;
if ($(media).data('icon-type') !== undefined && $(media).data('icon-type') !== "") {
var iconType = $(media).data('icon-type');
if (iconType === 'font' || iconType == 'image' || iconType == 'svg') {
if (iconType === 'font' || iconType === 'image' || iconType === 'svg') {
this.iconType = iconType;
this.forceIconType = true;
}
Expand Down
2 changes: 1 addition & 1 deletion build/ableplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@
this.forceIconType = false;
if ($(media).data('icon-type') !== undefined && $(media).data('icon-type') !== "") {
var iconType = $(media).data('icon-type');
if (iconType === 'font' || iconType == 'image' || iconType == 'svg') {
if (iconType === 'font' || iconType === 'image' || iconType === 'svg') {
this.iconType = iconType;
this.forceIconType = true;
}
Expand Down Expand Up @@ -6052,13 +6052,13 @@
* @returns {string} - The VTT content with processed tags.
*/
transformCSSClasses: function (vttContent) {
return vttContent.replace(
/<(v|c|b|i|u|lang|ruby)\.([\w\.]+)([^>]*)>/g,
function (_, tag, cssClasses, otherAttrs) {
var classAttr = cssClasses.replace(/\./g, " ");
return `<${tag} class="${classAttr}"${otherAttrs}>`;
}
);

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings starting with '<v..' and with many repetitions of '..'.
This
regular expression
that depends on
library input
may run slow on strings starting with '<v..' and with many repetitions of '..'.
},

/**
Expand Down Expand Up @@ -12172,7 +12172,7 @@

// add <br> BETWEEN each caption, but do not consider sibling style tags within this caption as the next caption!
if ( !next_child_tagname || ( next_child_tagname !== 'i' && next_child_tagname !== 'b' ) ) {
result += '<br>';

Check warning

Code scanning / CodeQL

Unsafe HTML constructed from library input Medium

This HTML construction which depends on
library input
might later allow
cross-site scripting
.
This HTML construction which depends on
library input
might later allow
cross-site scripting
.
}
} else {
// just add a space between captions
Expand Down
2 changes: 1 addition & 1 deletion build/ableplayer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/separate-dompurify/ableplayer.dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ var AblePlayerInstances = [];
this.forceIconType = false;
if ($(media).data('icon-type') !== undefined && $(media).data('icon-type') !== "") {
var iconType = $(media).data('icon-type');
if (iconType === 'font' || iconType == 'image' || iconType == 'svg') {
if (iconType === 'font' || iconType === 'image' || iconType === 'svg') {
this.iconType = iconType;
this.forceIconType = true;
}
Expand Down
2 changes: 1 addition & 1 deletion build/separate-dompurify/ableplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ var AblePlayerInstances = [];
this.forceIconType = false;
if ($(media).data('icon-type') !== undefined && $(media).data('icon-type') !== "") {
var iconType = $(media).data('icon-type');
if (iconType === 'font' || iconType == 'image' || iconType == 'svg') {
if (iconType === 'font' || iconType === 'image' || iconType === 'svg') {
this.iconType = iconType;
this.forceIconType = true;
}
Expand Down
2 changes: 1 addition & 1 deletion build/separate-dompurify/ableplayer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/ableplayer-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ var AblePlayerInstances = [];
this.forceIconType = false;
if ($(media).data('icon-type') !== undefined && $(media).data('icon-type') !== "") {
var iconType = $(media).data('icon-type');
if (iconType === 'font' || iconType == 'image' || iconType == 'svg') {
if (iconType === 'font' || iconType === 'image' || iconType === 'svg') {
this.iconType = iconType;
this.forceIconType = true;
}
Expand Down