mirror of
https://git.ludikovsky.name/git/fugitive.git
synced 2024-05-18 14:35:32 +02:00
fix replace_str '&' bug
'&' is a special char for sed and needed to be escaped (it caused bug for instance when the title of an article contained xml entities like ")
This commit is contained in:
parent
80c2dcf4a9
commit
0bc46006e9
|
@ -118,7 +118,7 @@ replace_condition() {
|
|||
}
|
||||
|
||||
replace_str() {
|
||||
esc=`echo $2 | sed 's/\//\\\\\//g'`
|
||||
esc=`echo "$2" | sed 's/\//\\\\\//g;s/&/\\\&/g'`
|
||||
replace_condition "$1" "$2" | \
|
||||
sed "s/<?fugitive[[:space:]]\+$1[[:space:]]*?>/$esc/g"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue