Esempio n. 1
0
 public BbcodeEventArgs(Core core, string contents, BbcodeTag tag, BbcodeOptions options, User postOwner, bool inList, int quoteDepth, int shareDepth, BbcodeParseMode mode, ref string prefixText, ref string suffixText, ref bool handled, ref bool abortParse)
 {
     this.core = core;
     this.tag = tag;
     this.options = options;
     this.attributes = tag.GetAttributes();
     this.contents = contents;
     this.prefixText = prefixText;
     this.suffixText = suffixText;
     this.inList = inList;
     this.quoteDepth = quoteDepth;
     this.shareDepth = shareDepth;
     this.mode = mode;
     this.handled = handled;
     this.abortParse = abortParse;
     this.owner = postOwner;
 }
Esempio n. 2
0
 private static bool TagAllowed(string tag, BbcodeOptions options)
 {
     switch (tag)
     {
         case "img":
             if ((options & BbcodeOptions.ShowImages) != BbcodeOptions.ShowImages)
             {
                 return false;
             }
             break;
         case "youtube":
             if ((options & BbcodeOptions.ShowVideo) != BbcodeOptions.ShowVideo)
             {
                 return false;
             }
             break;
         case "flash":
             if ((options & BbcodeOptions.ShowFlash) != BbcodeOptions.ShowFlash)
             {
                 return false;
             }
             break;
         case "silverlight":
             // we'll treat silverlight as flash for now
             if ((options & BbcodeOptions.ShowFlash) != BbcodeOptions.ShowFlash)
             {
                 return false;
             }
             break;
     }
     return true;
 }