Skip to content

Commit 7f56c94

Browse files
committed
Disallow \ in output_base in the plot directive
1 parent 20bed26 commit 7f56c94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ def _parse_srcset(entries):
638638
def check_output_base_name(env, output_base):
639639
docname = env.docname
640640

641-
if '.' in output_base or '/' in output_base:
641+
if '.' in output_base or '/' in output_base or '\\' in output_base:
642642
raise PlotError(
643643
f"The image-basename '{output_base}' is invalid. "
644644
f"It must not contain dots or slashes.")

0 commit comments

Comments
 (0)