Skip to content

Commit

Permalink
fix: escape regexp chars when copying a test link (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowusr authored Jun 16, 2024
1 parent 2cdb4fb commit e7b2103
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/static/components/controls/test-name-filter-input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const TestNameFilterInput = ({actions, testNameFilter: testNameFilterProp}) => {
<input
className="filter__input-name"
value={testNameFilter}
placeholder="filter by test name"
placeholder="Filter by test name or regexp"
onChange={onChange}
data-test-id="header-test-name-filter"
/>
Expand Down
6 changes: 3 additions & 3 deletions lib/static/components/section/title/browser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClipboardButton from 'react-clipboard.js';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {get} from 'lodash';
import {get, escapeRegExp} from 'lodash';
import * as actions from '../../../modules/actions';
import {appendQuery} from '../../../modules/query-params';
import {ViewMode} from '../../../../constants/view-modes';
Expand All @@ -15,8 +15,8 @@ import Bullet from '../../bullet';
const BrowserTitle = (props) => {
const getTestUrl = () => {
return appendQuery(window.location.href, {
browser: props.browserName,
testNameFilter: props.testName,
browser: escapeRegExp(props.browserName),
testNameFilter: escapeRegExp(props.testName),
strictMatchFilter: true,
retryIndex: props.retryIndex,
viewModes: ViewMode.ALL,
Expand Down

0 comments on commit e7b2103

Please sign in to comment.