HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search
-
how to update pre tag to code tag in DB
In vanilla 2.1 i did use geshi for syntaxhighlighting. In 2.2 i want to use creativesyntaxhighlighter for it. In geshi, all the code is between pre tags like below: <pre lang="html" line="1">code goes here</pre> same for php, js and css In creativesyntax i use the code tag to highlight: <code lang="html"> code goes… -
Re: how to update pre tag to code tag in DB
-
Re: how to update pre tag to code tag in DB
UPDATE GDN_Comment SET Body = '<code lang="php">' WHERE Body = '<pre lang="php" line="1">'; This is wrong becuase you are saying the entire body is is <pre lang="php" line="1">, and the entire body is to be replaced You want UPDATE GDN_Comment SET Body = REPLACE(Body, '<pre lang="php" line="1">', '<code lang="php">') WHERE…
3 results