|
@@ -834,7 +834,8 @@ func (s *Script) LoadScript(site, channel, user *string, code, script_file strin
|
|
text := S.ToString(-3)
|
|
text := S.ToString(-3)
|
|
old := S.ToString(-2)
|
|
old := S.ToString(-2)
|
|
repl := S.ToString(-1)
|
|
repl := S.ToString(-1)
|
|
- text = strings.Replace(text, old, repl, n)
|
|
|
|
|
|
+ reg := regexp.MustCompile(old)
|
|
|
|
+ text = reg.ReplaceAllString(text, repl)
|
|
S.Push(lua.LString(text))
|
|
S.Push(lua.LString(text))
|
|
return 1
|
|
return 1
|
|
}))
|
|
}))
|
|
@@ -1145,7 +1146,7 @@ func (s *Script) LoadScript(site, channel, user *string, code, script_file strin
|
|
if err == nil {
|
|
if err == nil {
|
|
headJsonStr = string(headByte)
|
|
headJsonStr = string(headByte)
|
|
}
|
|
}
|
|
- code, respHead, respCookie := codegrpc.GetCodeByPath(path, stype, headJsonStr, cookie, proxy)
|
|
|
|
|
|
+ code, respHead, respCookie := codegrpc.GetCodeByPath(s.SCode, path, stype, headJsonStr, cookie, proxy)
|
|
//qu.Debug("code====", code)
|
|
//qu.Debug("code====", code)
|
|
//qu.Debug("respHead====", respHead)
|
|
//qu.Debug("respHead====", respHead)
|
|
//qu.Debug("respCookie====", respCookie)
|
|
//qu.Debug("respCookie====", respCookie)
|