Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: tools-reference/sed/
Date: Mon, 29 Mar 2021 20:44:08
Message-Id: 1617050497.0b00ff1312e734ae453a9f61f504bdc400b2b2df.ulm@gentoo
1 commit: 0b00ff1312e734ae453a9f61f504bdc400b2b2df
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 20 14:48:24 2021 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 29 20:41:37 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=0b00ff13
7
8 tools-reference/sed: emphasise need for delimiter care
9
10 Bug: https://bugs.gentoo.org/685160
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
13
14 tools-reference/sed/text.xml | 7 ++++++-
15 1 file changed, 6 insertions(+), 1 deletion(-)
16
17 diff --git a/tools-reference/sed/text.xml b/tools-reference/sed/text.xml
18 index b971946..f116eac 100644
19 --- a/tools-reference/sed/text.xml
20 +++ b/tools-reference/sed/text.xml
21 @@ -132,7 +132,12 @@ The above will replace <c>irksome texting</c> with
22 <p>
23 If the pattern or the replacement string contains the forward slash character,
24 it is usually easiest to use a different delimiter. Most punctuation characters
25 -are allowed, although backslash and any form of brackets should be avoided.
26 +are allowed, although backslash and any form of brackets should be avoided. You
27 +should choose your delimiter <b>with care</b> to ensure it cannot appear in any
28 +strings involved in the subject/replacement. For example, using <c>sed</c> with
29 +CFLAGS is hazardous because it is user-supplied data (so may contain any
30 +character), but one should in particular avoid e.g.
31 +<uri link="https://bugs.gentoo.org/685160">the colon</uri> here.
32 </p>
33
34 <codesample lang="ebuild">