fix(techdocs-plugin): apply review suggestions

- strict regex scope to avoid security issues
- add techdocs prefix to the changeset file

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2021-08-03 08:56:01 +02:00
parent b24a18e406
commit db58cf06c2
2 changed files with 3 additions and 3 deletions
@@ -14,9 +14,9 @@
* limitations under the License.
*/
const TECHDOCS_CSS = /main\.[A-Fa-f0-9]{8}\.min\.css/;
const GOOGLE_FONTS = /fonts\.googleapis\.com/;
const GSTATIC_FONTS = /fonts\.gstatic\.com/;
const TECHDOCS_CSS = /main\.[A-Fa-f0-9]{8}\.min\.css$/;
const GOOGLE_FONTS = /^https:\/\/fonts\.googleapis\.com/;
const GSTATIC_FONTS = /^https:\/\/fonts\.gstatic\.com/;
export const safeLinksHook = (node: Element) => {
if (node.nodeName && node.nodeName === 'LINK') {