cfengine/core — pull request #437 by chrishiestand (2013-03-16 01:41:05+00:00)
Title: Fix replace_or_add() when regex chars used

replace_or_add(pattern, line) will currently break
if line incidentally contains special regular expression
characters. So $(line) should be escaped because it needs
to be matched literally.

For example, this fixes replace_or_add() when used in a crontab:

replace_or_add(".*myscript.*", "* * * * * /usr/bin/myscript $(arg1)")