コード例 #1
0
 /// <summary>
 /// Handles the filters for closing html tags
 /// </summary>
 private void CloseTag(FilterBuffer b, int i, FilterTags Filters)
 {
     i = b.SkipWhiteSpace(i, true);
     b.Write(i);
     b.Write(Filters.Content.HTML);
     b.Seek(i);
 }
コード例 #2
0
        /// <summary>
        /// This is the actual Response filter.
        /// </summary>
        /// <param name="b"></param>
        public void DoFilter(FilterBuffer b)
        {
            int j;

            foreach (object o in BkupList)
            {
                FwdList.Add(o);
            }
            if (FwdList.Count > 0)
            {
                int i = b.IndexOf('<');
                //TODO: Add backup.
                //TODO: handle multiple calls.
                while (i < b.Last)
                {
                    j = b.IndexOf('>', i);
                    while (InComment(b, i, j))
                    {
                        j = b.IndexOf('>', j + 1);
                    }
                    if (i < j)
                    {
                        i = b.IndexOf('<', HandleTag(b, i, j, b.ToString(i, j), FwdList));
                    }
                }
            }
            b.Write();
        }
コード例 #3
0
 /// <summary>
 /// Handles the filters for opening html tags
 /// </summary>
 private void OpenTag(FilterBuffer b, int i, int j, string tag, FilterTags Filters)
 {
     b.Write(i);
     if (Filters.Replace != null)
     {
         tag = Filters.Replace.HTML;
     }
     foreach (FilterTag F in Filters.Attributes)
     {
         F.Substitute(ref tag);
     }
     b.Write(tag);
     if (Filters.Content != null)
     {
         b.Write(Filters.Content.HTML);
     }
     b.Seek(j + 1);
 }